-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
6u21
-
x86
-
windows_7
FULL PRODUCT VERSION :
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
getReadMethod method from PropertyDescriptor class from java.beans package returns "get" prefix insted of "is" prefix.
for example if field is declared as "Boolean field" getReadMethod returns "getField", when it should return "isField".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
package pl.dolorfer;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class Test
{
private Boolean b;
public Boolean isB(){return b;}
public void setB(Boolean b){this.b = b;}
public static void main(String[] args) throws IntrospectionException
{
BeanInfo info = Introspector.getBeanInfo( Test.class );
PropertyDescriptor[] props = info.getPropertyDescriptors();
System.out.println(props[0].getReadMethod());
}
}
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package pl.dolorfer;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class Test
{
private Boolean b;
public Boolean isB(){return b;}
public void setB(Boolean b){this.b = b;}
public static void main(String[] args) throws IntrospectionException
{
BeanInfo info = Introspector.getBeanInfo( Test.class );
PropertyDescriptor[] props = info.getPropertyDescriptors();
System.out.println(props[0].getReadMethod());
}
}
---------- END SOURCE ----------
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
getReadMethod method from PropertyDescriptor class from java.beans package returns "get" prefix insted of "is" prefix.
for example if field is declared as "Boolean field" getReadMethod returns "getField", when it should return "isField".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
package pl.dolorfer;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class Test
{
private Boolean b;
public Boolean isB(){return b;}
public void setB(Boolean b){this.b = b;}
public static void main(String[] args) throws IntrospectionException
{
BeanInfo info = Introspector.getBeanInfo( Test.class );
PropertyDescriptor[] props = info.getPropertyDescriptors();
System.out.println(props[0].getReadMethod());
}
}
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package pl.dolorfer;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class Test
{
private Boolean b;
public Boolean isB(){return b;}
public void setB(Boolean b){this.b = b;}
public static void main(String[] args) throws IntrospectionException
{
BeanInfo info = Introspector.getBeanInfo( Test.class );
PropertyDescriptor[] props = info.getPropertyDescriptors();
System.out.println(props[0].getReadMethod());
}
}
---------- END SOURCE ----------