On Tue, 21 Mar 2006, Garrett Rooney wrote:
> On 3/20/06, Daniel Rall <firstname.lastname@example.org> wrote:
> > According to the new unit test, the attached patch works. Thoughts?
> It's quite likely this is just me not understanding something about
> JNI, but if the Path class only has a single static method, why does
> it have constructors at all? In normal C++ code I wouldn't expect
> there to even be one, it might even have a private
> constructor/destructor to avoid having users accidentally instantiate
Garrett and I discussed this a bit. We came to the conclusion that
the constructor could be avoided (since we've got the same one a
compiler would generate), and the only reason to have the destructor
would be to declare it as virtual, for the very unlikely case that
someone sub-classed the SVNPath C++ class. Additionally, we could
completely dump SVNPath's .cpp and .h, and inline the static method's
code into the org_tigris_subversion_javahl_Path JNI wrapper.
Though I'm a bit on the fence about it (because it doesn't offer much
value ATM), I decided to keep SVNPath around for consistency with the
other JavaHL C++ code. I've removed the definitions for both
(compiler-generated is fine), and made the declarations protected.
Code committed in r18989. Tim, Subversion 1.4.0 will offer your new
Received on Thu Mar 23 00:07:48 2006
- application/pgp-signature attachment: stored