United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6491420 XPStyle.getSkin returning null is dangerous
JDK-6491420 : XPStyle.getSkin returning null is dangerous

Details
Type:
Bug
Submit Date:
2006-11-08
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
generic,windows_xp
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Relates:
Relates:

Sub Tasks

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.
                                     
2006-11-14



Hardware and Software, Engineered to Work Together