You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Svetlana Samoilenko (JIRA)" <ji...@apache.org> on 2006/10/12 10:38:35 UTC

[jira] Created: (HARMONY-1838) [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors() returns wrong object

[classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns wrong object
----------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-1838
                 URL: http://issues.apache.org/jira/browse/HARMONY-1838
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Svetlana Samoilenko


Description:
Bean.class contains 2 methods getProp1 and setProp2.
java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns an array with 1 element 
   propertyDescriptors[0].getName()=class
while RI returns an array with 3 element:
   propertyDescriptors[0].getName()=class
   propertyDescriptors[1].getName() =prop1
   propertyDescriptors[2].getName() =prop2
public class test extends TestCase{
    public void testgetPropertyDescriptors() {        
          try {
              PropertyDescriptor[] propertyDescriptors = Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()           
              assertEquals("class", propertyDescriptors[0].getName()); 
              assertEquals("prop1",propertyDescriptors[1].getName()); 
              assertEquals("prop2",propertyDescriptors[2].getName()); 
              assertEquals(3,propertyDescriptors.length); 
          } catch (IntrospectionException e) {        
              fail("unexpected IntrospectionException");     
          }
    }

class Bean {      
    public String getProp1(int i) {
        return null;
    }
    public void setProp2(int i, String str) {
    }  
} 
HARMONY output:
=============
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
.E
Time: 0.11
There was 1 error:
1) testgetPropertyDescriptors(test)java.lang.ArrayIndexOutOfBoundsException
        at test.testgetPropertyDescriptors(test.java:12)
        at java.lang.reflect.VMReflection.invokeMethod(Native Method)
FAILURES!!!
Tests run: 1,  Failures: 0,  Errors: 1

SUN output:
==========
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
.
Time: 0.01
OK (1 test)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1838) [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors() returns wrong object

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1838?page=all ]

Svetlana Samoilenko updated HARMONY-1838:
-----------------------------------------

    Attachment: H-1838-IntrospectorTest.patch

test

> [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns wrong object
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1838
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1838
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>         Attachments: H-1838-IntrospectorTest.patch
>
>
> Description:
> Bean.class contains 2 methods getProp1 and setProp2.
> java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns an array with 1 element 
>    propertyDescriptors[0].getName()=class
> while RI returns an array with 3 element:
>    propertyDescriptors[0].getName()=class
>    propertyDescriptors[1].getName() =prop1
>    propertyDescriptors[2].getName() =prop2
> public class test extends TestCase{
>     public void testgetPropertyDescriptors() {        
>           try {
>               PropertyDescriptor[] propertyDescriptors = Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()           
>               assertEquals("class", propertyDescriptors[0].getName()); 
>               assertEquals("prop1",propertyDescriptors[1].getName()); 
>               assertEquals("prop2",propertyDescriptors[2].getName()); 
>               assertEquals(3,propertyDescriptors.length); 
>           } catch (IntrospectionException e) {        
>               fail("unexpected IntrospectionException");     
>           }
>     }
> class Bean {      
>     public String getProp1(int i) {
>         return null;
>     }
>     public void setProp2(int i, String str) {
>     }  
> } 
> HARMONY output:
> =============
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> .E
> Time: 0.11
> There was 1 error:
> 1) testgetPropertyDescriptors(test)java.lang.ArrayIndexOutOfBoundsException
>         at test.testgetPropertyDescriptors(test.java:12)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> SUN output:
> ==========
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> .
> Time: 0.01
> OK (1 test)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-1838) [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors() returns wrong object

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1838?page=all ]

Alexei Zakharov resolved HARMONY-1838.
--------------------------------------

    Resolution: Fixed

Fixes were applied at r472854. Svetlana, please check that it resolves the issue.

> [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns wrong object
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1838
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1838
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>         Assigned To: Alexei Zakharov
>         Attachments: H-1838-IntrospectorTest.patch
>
>
> Description:
> Bean.class contains 2 methods getProp1 and setProp2.
> java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns an array with 1 element 
>    propertyDescriptors[0].getName()=class
> while RI returns an array with 3 element:
>    propertyDescriptors[0].getName()=class
>    propertyDescriptors[1].getName() =prop1
>    propertyDescriptors[2].getName() =prop2
> public class test extends TestCase{
>     public void testgetPropertyDescriptors() {        
>           try {
>               PropertyDescriptor[] propertyDescriptors = Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()           
>               assertEquals("class", propertyDescriptors[0].getName()); 
>               assertEquals("prop1",propertyDescriptors[1].getName()); 
>               assertEquals("prop2",propertyDescriptors[2].getName()); 
>               assertEquals(3,propertyDescriptors.length); 
>           } catch (IntrospectionException e) {        
>               fail("unexpected IntrospectionException");     
>           }
>     }
> class Bean {      
>     public String getProp1(int i) {
>         return null;
>     }
>     public void setProp2(int i, String str) {
>     }  
> } 
> HARMONY output:
> =============
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> .E
> Time: 0.11
> There was 1 error:
> 1) testgetPropertyDescriptors(test)java.lang.ArrayIndexOutOfBoundsException
>         at test.testgetPropertyDescriptors(test.java:12)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> SUN output:
> ==========
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> .
> Time: 0.01
> OK (1 test)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1838) [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors() returns wrong object

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1838?page=all ]

Alexei Zakharov reassigned HARMONY-1838:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns wrong object
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1838
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1838
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>         Assigned To: Alexei Zakharov
>         Attachments: H-1838-IntrospectorTest.patch
>
>
> Description:
> Bean.class contains 2 methods getProp1 and setProp2.
> java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()  returns an array with 1 element 
>    propertyDescriptors[0].getName()=class
> while RI returns an array with 3 element:
>    propertyDescriptors[0].getName()=class
>    propertyDescriptors[1].getName() =prop1
>    propertyDescriptors[2].getName() =prop2
> public class test extends TestCase{
>     public void testgetPropertyDescriptors() {        
>           try {
>               PropertyDescriptor[] propertyDescriptors = Introspector.getBeanInfo(Bean.class).getPropertyDescriptors()           
>               assertEquals("class", propertyDescriptors[0].getName()); 
>               assertEquals("prop1",propertyDescriptors[1].getName()); 
>               assertEquals("prop2",propertyDescriptors[2].getName()); 
>               assertEquals(3,propertyDescriptors.length); 
>           } catch (IntrospectionException e) {        
>               fail("unexpected IntrospectionException");     
>           }
>     }
> class Bean {      
>     public String getProp1(int i) {
>         return null;
>     }
>     public void setProp2(int i, String str) {
>     }  
> } 
> HARMONY output:
> =============
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> .E
> Time: 0.11
> There was 1 error:
> 1) testgetPropertyDescriptors(test)java.lang.ArrayIndexOutOfBoundsException
>         at test.testgetPropertyDescriptors(test.java:12)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> SUN output:
> ==========
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> .
> Time: 0.01
> OK (1 test)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira