+1 to commit to trunk. Please include "Approved by: hwright" in the
log message.
Out of curiosity, why do directory objects need to live across method
invocations with the RA interface? I would have thought that even if
this is true, it won't matter, since those objects would be pure Java
objects handled by the JVM.
-Hyrum
On Fri, May 25, 2012 at 12:35 PM, Vladimir Berezniker
<vmpn_at_hitechman.com> wrote:
> Greetings,
>
> Currently SVNBase class uses a member variable jthis to hold a copy of
> jobject
> reference. This variable lives as long as SVNClient object lives, however,
> the
> reference itself is only valid during a single JNI call. Â To address this
> mismatch
> the attached patch passes the jobject reference as a parameter instead.
> Â This
> eliminates the risk of the jobject reference being misused outside the
> scope
> where it is valid. Â This mismatch becomes more evident on JavaHL
> RA editor API is implemented where objects like directories live across
> method
> calls.
>
> [[[
> JavaHL: Explicitly pass jobject jthis when processing dispose() call rather
> Â than stashing a reference in the SVNBase class where it can be misused
> later
>
> [ in subversion/bindings/javahl/native ]
>
> * SVNBase.cpp,
> Â SVNBase.h
> Â (dispose, jthis): Accept jobject jthis as explicit parameter to dispose()
> and
> Â Â Â Â Â Â Â Â Â Â delete the member variable jthis
>
> * SVNClient.cpp,
> Â SVNClient.h,
> Â SVNRepos.cpp,
> Â SVNRepos.h
> Â (dispose): Accept object jthis as explicit parameter and pass it to
> Â Â Â Â Â Â Â SVNBase::dispose
>
> * org_apache_subversion_javahl_SVNClient.cpp,
> Â org_apache_subversion_javahl_SVNRepos.cpp
> Â (Java_org_apache_subversion_javahl_SVNClient_dispose,
> Â Â Java_org_apache_subversion_javahl_SVNRepos_dispose):
> Â Â Pass object jthis as explicit parameter and pass it to the C++ wrapper
> class
> ]]]
>
> Thank you,
>
> Vladimir
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-05-25 20:36:37 CEST