Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 82035 invoked from network); 8 Nov 2006 12:55:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2006 12:55:20 -0000 Received: (qmail 95958 invoked by uid 500); 8 Nov 2006 12:55:30 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 95939 invoked by uid 500); 8 Nov 2006 12:55:30 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 95928 invoked by uid 99); 8 Nov 2006 12:55:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2006 04:55:30 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2006 04:55:19 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BC82A7142F7 for ; Wed, 8 Nov 2006 04:54:58 -0800 (PST) Message-ID: <10621325.1162990498767.JavaMail.jira@brutus> Date: Wed, 8 Nov 2006 04:54:58 -0800 (PST) From: "Alexei Zakharov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Assigned: (HARMONY-1838) [classlib][beans] java.beans.Introspector.getBeanInfo(Bean.class).getPropertyDescriptors() returns wrong object In-Reply-To: <7518944.1160642315959.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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