Request for review 7147066: [macosx] FileDialog.getDirectory() returns incorrect directory

Mike Swingler swingler at apple.com
Tue Feb 28 08:58:19 PST 2012


On Feb 27, 2012, at 2:45 PM, Dmitry Cherepanov wrote:

> Hello,
> 
> Here's a fix for two regressions caused by the changes for the multiple file selection support [1] (7124337). The fix adds an additional check "result == NSOKButton" to avoid the exception "attempt to insert nil object from objects[0]". Also after the fix, the file dialog returns a string constructed from -[NSURL path] (without the file protocol) as it was before the fix for 7124337.
> 
> Webrev - http://cr.openjdk.java.net/~dcherepanov/7147066/webrev/
> 
> Thanks,
> Dmitry
> 
> [1] http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/0e2f3e494814

Dmitry, in this case you want to use JNFNormalizedJavaStringForPath() instead of JNFNSToJavaString() which will correctly handle the translation from HFS's decomposed UTF8 strings to Java's precomposed UTF8 strings.

Regards,
Mike Swingler
Apple Inc.



More information about the macosx-port-dev mailing list