-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.1.3
-
generic
-
generic
Since the Integer and Boolean property editors (IntEditor and
BoolEditor) provided in the sun.beans.editors package do not conform
to the Beans PropertyEditor naming convention, the
PropertyEditorManager should register them using both .TYPE and
.CLASS. Right now, it only uses .TYPE, and findEditor class for
java.lang.Integer.class and java.lang.Boolean.class return null. See
output from program below...
Scott
D:\java_bugs\six>type Bug.java
import java.beans.*;
public class Bug
{
public static void main(String[] args)
{
PropertyEditor pe;
pe =
PropertyEditorManager.findEditor(java.lang.Integer.class);
System.out.println( "Integer.class: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Integer.TYPE );
System.out.println( "Integer.TYPE: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Float.class );
System.out.println( "Float.class: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Float.TYPE );
System.out.println( "Float.TYPE: " + pe );
}
}
Here's the output :
D:\java_bugs\six>java Bug
Symantec Java! JustInTime Compiler Version 210.046 for JDK 1.1.2
Copyright (C) 1996-97 Symantec Corporation
Integer.class: null
Integer.TYPE: sun.beans.editors.IntEditor@1ec7e1
Float.class: sun.beans.editors.FloatEditor@1ec803
Float.TYPE: sun.beans.editors.FloatEditor@1ec813
BoolEditor) provided in the sun.beans.editors package do not conform
to the Beans PropertyEditor naming convention, the
PropertyEditorManager should register them using both .TYPE and
.CLASS. Right now, it only uses .TYPE, and findEditor class for
java.lang.Integer.class and java.lang.Boolean.class return null. See
output from program below...
Scott
D:\java_bugs\six>type Bug.java
import java.beans.*;
public class Bug
{
public static void main(String[] args)
{
PropertyEditor pe;
pe =
PropertyEditorManager.findEditor(java.lang.Integer.class);
System.out.println( "Integer.class: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Integer.TYPE );
System.out.println( "Integer.TYPE: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Float.class );
System.out.println( "Float.class: " + pe );
pe = PropertyEditorManager.findEditor(
java.lang.Float.TYPE );
System.out.println( "Float.TYPE: " + pe );
}
}
Here's the output :
D:\java_bugs\six>java Bug
Symantec Java! JustInTime Compiler Version 210.046 for JDK 1.1.2
Copyright (C) 1996-97 Symantec Corporation
Integer.class: null
Integer.TYPE: sun.beans.editors.IntEditor@1ec7e1
Float.class: sun.beans.editors.FloatEditor@1ec803
Float.TYPE: sun.beans.editors.FloatEditor@1ec813