-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.3.0
-
Cause Known
-
generic
-
generic
The specifications for java.awt.Component.get/setComponentOrientation do not specify the handling of null values. There are two possibilities:
1) setComponentOrientation throws NullPointerException when null is passed in; getComponentOrientation does not return null.
2) setComponentOrientation accepts null, getComponentOrientation may return null.
Currently, no exception is thrown. However, numerous callers in the J2RE assume that getComponentOrientation returns non-null values and call methods on the returned object without first checking for null. This indicates that solution 1) should be preferred.
1) setComponentOrientation throws NullPointerException when null is passed in; getComponentOrientation does not return null.
2) setComponentOrientation accepts null, getComponentOrientation may return null.
Currently, no exception is thrown. However, numerous callers in the J2RE assume that getComponentOrientation returns non-null values and call methods on the returned object without first checking for null. This indicates that solution 1) should be preferred.