Patch for Review: JvGetStringUTF and JvTempCString

Tom Tromey tromey@redhat.com
Mon Aug 11 23:26:00 GMT 2003


>>>>> "Bryce" == Bryce McKinlay <bryce@mckinlay.net.nz> writes:

Bryce> In this case (natFile*), I think there is a better
Bryce> approach. Since the path of a given File object never changes,
Bryce> we can cache the path in UTF format when each File object is
Bryce> constructed.

That makes sense.

However, I'd prefer to see the UTF data lazily computed.  That way
there's minimal overhead in the (not uncommon) case where no low-level
operation is actually performed on the File.

So maybe Mohan's class isn't needed after all...


BTW we should probably use the default encoding, and not UTF, for file
names and the like.  Your approach makes that simpler.

Tom



More information about the Java-patches mailing list