[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: request to add new method in javahl: SVNClient.isValidPath

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-03-23 00:16:38 CET

On Tue, 21 Mar 2006, Garrett Rooney wrote:

> On 3/20/06, Daniel Rall <dlr@collab.net> 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
> it.

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
API: org.tigris.subversion.javahl.Path.isValid(String)

Daniel Rall

  • application/pgp-signature attachment: stored
Received on Thu Mar 23 00:07:48 2006

This is an archived mail posted to the Subversion Dev mailing list.