Hi Manajit,

A few suggestions/queries: 
1) Please check the same situation where a FileDialog_SAVE is used instead. 
Does the fix impact this case? 
If there is no impact in that case (which is the most likely situation), can 
the else block be removed as no other case should be handled then because as 
far as I understand, the FileDialog_SAVE is already handled?
2) Where are fDirectory and fFile being set? Can a change be done to this 
instead within safeSaveOrLoad method?
3) What I gather from the actual situation is that safeSaveOrLoad is called 
multiple times even before the defaults are retrieved and this change will run 
Modally only when the details are available for display.
Is it possible to trace what is calling it before the object is created? Maybe 
there is a bigger problem altogether and even though this fixes it neatly, a 
clean solution might possibly exist. This is just a recommendation though.

With Regards,
Avik Niyogi

> On 10-Nov-2016, at 11:00 pm, Manajit Halder <manajit.hal...@oracle.com> wrote:
> 
> Hi All,
> 
> Kindly review the fix for JDK9.
> 
> Bug: 
> https://bugs.openjdk.java.net/browse/JDK-8160453 
> <https://bugs.openjdk.java.net/browse/JDK-8160453>
> 
> Webrev: 
> http://cr.openjdk.java.net/~mhalder/8160453/webrev.00/ 
> <http://cr.openjdk.java.net/~mhalder/8160453/webrev.00/>
> 
> Issue: 
> Test passed but stack trace was generated because of trying to pass nil 
> directory as parameter in method runModalForDirectory.
> 
> Fix: 
> Added nil check for directory and file before calling the method 
> runModalForDirectory.
> 
> Regards,
> Manajit

Reply via email to