/[Apache-SVN]
ViewVC logotype

Revision 1882115


Jump to revision: Previous Next
Author: amiloslavskiy
Date: Tue Sep 29 12:12:59 2020 UTC (3 years, 6 months ago)
Changed paths: 1
Log Message:
JavaHL: Fix incorrect cache in SVNBase::createCppBoundObject

The problem here is that 'SVNBase::createCppBoundObject' can work
with different classes (see argument), but it cached methodID of
'<init>' for the first class processed. When invoked with a
different class later, it will call wrong '<init>' method.

The error is seen when running JavaHL tests with JDK14.

Error message is:
FATAL ERROR in native method: Wrong object class or methodID passed to JNI call
  at <...>.javahl.util.SubstLib.translateOutputStream(Native Method)
  at <...>.javahl.SVNUtil.translateStream(SVNUtil.java:1046)
  at <...>.javahl.UtilTests.testTranslateStream(UtilTests.java:521)
  <...>

[in subversion/bindings/javahl]
* native/SVNBase.cpp
  (createCppBoundObject): Do not cache methodID.

Review by: hartmannathan

Approved by: hartmannathan


Changed paths

Path Details
Directorysubversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26