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

Mike Swingler swingler at
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 -
> Thanks,
> Dmitry
> [1]

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.

Mike Swingler
Apple Inc.

More information about the macosx-port-dev mailing list