JDK-6923226 : Exceptions at running JavaTest GUI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u19
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp,windows_vista,windows_7
  • CPU: x86
  • Submitted: 2010-02-04
  • Updated: 2011-03-08
  • Resolved: 2010-03-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u19 b03Fixed 7Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Testsuite name: Regression test suite
JDK/JRE tested: jdk-6u19-fcs-bin-b02-windows-i586-02_feb_2010.exe
OS/architecture: win7-ultimate-i586 
Reproducible: Always 
Is it a platform specific regression: Y  
Is it a Regression: Y   
	Regression introduced in release/build: 6u19 b01
Steps to reproduce:
Take an javatest.jar (I used a 3.2.2_02 fcs b08 version)
Delete .javatest folder from HOME dir.
Run java -jar javatest.jar

A lot of exceptions are thrown:
Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException
	at sun.awt.shell.Win32ShellFolder2.hasAttribute(Win32ShellFolder2.java:523)
	at sun.awt.shell.Win32ShellFolder2.isFileSystem(Win32ShellFolder2.java:514)
	at sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Win32ShellFolderManager2.java:348)
	at sun.awt.shell.ShellFolder.isFileSystemRoot(ShellFolder.java:242)
	at javax.swing.filechooser.FileSystemView.isFileSystemRoot(FileSystemView.java:310)
	at javax.swing.filechooser.WindowsFileSystemView.isTraversable(FileSystemView.java:632)
	at javax.swing.JFileChooser.isTraversable(JFileChooser.java:1561)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:232)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)
FileSystemView.getShellFolder: f=C:\JDK\jdk1.6.0_19\bin
java.io.FileNotFoundException: Execution was interrupted
	at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Win32ShellFolderManager2.java:54)
	at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Win32ShellFolderManager2.java:44)
	at sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:218)
	at javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:507)
	at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:431)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:218)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)
Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException
	at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:434)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:218)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)

Comments
SUGGESTED FIX 1. Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException at sun.awt.shell.Win32ShellFolder2.hasAttribute(Win32ShellFolder2.java:523) There is a problem in hasAttribute method. The next code return invoke(new Callable<Boolean>() {... can throw NPE when the current thread is interrupted and the result of invoke() is NULL. This code should be changed to: Boolean result = invoke(new Callable<Boolean>() {... return result != null && result; JDK7 doesn't have such problem because it was fixed as a part of CR 6460525, see webrev http://sa.sfbay.sun.com/projects/swing_data/7/6460525.0/. Therefore we should backport part of fix 6460525 that relative to the hasAttribute method 2. Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:434) It's a duplicate of CR 6868611, see webrev http://sa.sfbay.sun.com/projects/swing_data/7/6868611.0/. Therefore we should backport that fix
12-02-2010

EVALUATION I analyzed stacktraces of the bug and I see two different problems: 1. Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException at sun.awt.shell.Win32ShellFolder2.hasAttribute(Win32ShellFolder2.java:523) It's a duplicate of CR 6925192, see evaluation of CR 6925192 2. Exception in thread "Basic L&F File Loading Thread" java.lang.NullPointerException at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:434) It's a duplicate of CR 6868611 (fix of that bug is in jdk7)
11-02-2010

EVALUATION Looks like a JFileChooser issue
10-02-2010