United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6963870 NPE in CompoundBorder.getInsets()
JDK-6963870 : NPE in CompoundBorder.getInsets()

Details
Type:
Bug
Submit Date:
2010-06-24
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
It is possible to get an NPE from CompoundBorder.getBorderInsets(). While it checks if inner and outer borders are non-null before calling their getBorderInsets() methods, there is no check that a non-null Insets object is returned.

                                    

Comments
EVALUATION

The real question is why we get null border insets. It turns out GTKPainter.ListTableFocusBorder.getBorderInsets() uses null Insets, probably as an optimization.
                                     
2010-06-24



Hardware and Software, Engineered to Work Together