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

Dmitry Cherepanov dmitry.cherepanov at oracle.com
Tue Feb 28 14:01:33 PST 2012


Mike Swingler wrote:
> 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.
>>
>> 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.
>   

Mike,

Thanks for the suggestion. Here's new webrev - 
http://cr.openjdk.java.net/~dcherepanov/7147066/webrev.1/

Thanks,
Dmitry
> Regards,
> Mike Swingler
> Apple Inc.
>
>   



More information about the macosx-port-dev mailing list