RFR 7901960: JFileChooserOperator.selectFile(..) throws NullPointerException on Mac

Muneer Kolarkunnu abdul.kolarkunnu at oracle.com
Thu Dec 7 16:51:29 UTC 2017


There are lots of places code like:
if(list instanceof JList) {
} else {

Do we need to add "else if(list instanceof JTable)" in case of else case?

Better to use output.printTrace() instead of below:
456         System.out.println(list);

Alignment is not proper:
1528                     if(list instanceof JList)
1529                     if (((JList) list).getCellBounds(current, current) != null) {
1530                         return ((JList) list).getCellBounds(size - 1, size - 1);
1531                     } else {
1532                         return null;
1533                     }
1534                     else
1535                     if (((JTable)list).getCellRect(current, 0, false) != null) {
1536                         return ((JTable)list).getCellRect(size - 1, 0, false);


-----Original Message-----
From: Alexandre (Shura) Iline 
Sent: Thursday, December 07, 2017 5:10 AM
To: jemmy-dev at openjdk.java.net
Cc: Muneer Kolarkunnu <abdul.kolarkunnu at oracle.com>; Srinivas Mandalika <srinivas.mandalika at oracle.com>; Sergey Bylokhov <sergey.bylokhov at oracle.com>
Subject: RFR 7901960: JFileChooserOperator.selectFile(..) throws NullPointerException on Mac


Please take a look on this fix:
Bug: https://bugs.openjdk.java.net/browse/CODETOOLS-7901960
Webrev: http://cr.openjdk.java.net/~shurailine/7901960/webrev.00/

While working on the fix I have discovered that, depending on as OS or L&F, the list inside file chooser may or may not select files when clicking outside of displayed filename. I have created these:


More information about the jemmy-dev mailing list