JDK-6491420 : XPStyle.getSkin returning null is dangerous
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2006-11-08
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
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.
Other JDK 6 JDK 7
5.0u12Resolved 6u1Fixed 7 b07Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Part of the fix for 6432397 was to get XPStyle.getSkin to return 'null' if PART is not defined in the current theme. That has caused some problems:
6467366 REGESSION: JFileChooser displays garbage as Applet using WinXP LAF
6470308 Switching between "Windows and button" style on XP, color schemes on Vista is throwing an NPE.

While these problmes have always been there after the change for XPSteyl.getSkin the manifestation got worse.
I suggest to revert XPStyle.getSkin to not return null.

Comments
EVALUATION I suggest to use assert instead of returning null. Please see comments section for more details.
14-11-2006