Merge r1880886 from trunk: * r1880886 Fix crash in JavaHL JNI wrapper caused by object lifetimes Justification: Fixes a crash encountered with GCC 10. Votes: +1: hartmannathan, jamessan