You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2010/02/01 07:07:30 UTC

Re: svn commit: r905181 [2/2] - in /harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/StandardBeanInfo.java test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java

Kevin,

I'm slightly puzzled about the two comments in your recent commit that
I've included below.  I'm not sure IBM and SUN references make sense in
this context.  Perhaps you mean Harmony and RI?

Regards,
-Mark

In message <20...@eris.apache.org>, zhoukevin@apache.org 
writes:
>
> Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apa
> che/harmony/beans/tests/java/beans/IntrospectorTest.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/bea
> ns/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.j
> ava?rev=905181&r1=905180&r2=905181&view=diff
> =============================================================================
> =
> --- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/ha
> rmony/beans/tests/java/beans/IntrospectorTest.java (original)
> +++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/ha
> rmony/beans/tests/java/beans/IntrospectorTest.java Mon Feb  1 05:38:20 2010
> @@ -2844,4 +2844,2858 @@
>          public void setProp1(int n, Integer val) {}
>      }
>  
[ SNIP ]

> +
> +    public class MixedBooleanSimpleClass1 {
> +
> +        public boolean isList(int index) {
> +            return false;
> +        }
> +
> +        public boolean isList() {
> +            return false;
> +        }
> +    }
> +
> +    /*
> +     * SUN: GetterMixedClass1.isList()
> +     * 
> +     * IBM: GetterMixedClass1.isList(int)
> +     */
> +    public void test_MixedBooleanSimpleClass1() throws Exception {
> +        BeanInfo info = Introspector
> +                .getBeanInfo(MixedBooleanSimpleClass1.class);
> +        Method getter = MixedBooleanSimpleClass1.class
> +                .getDeclaredMethod("isList");
> +
> +        for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
> +            if (propertyName.equals(pd.getName())) {
> +                assertFalse(pd instanceof IndexedPropertyDescriptor);
> +                assertEquals(getter, pd.getReadMethod());
> +                assertNull(pd.getWriteMethod());
> +            }
> +        }
> +    }
> +
> +    public class MixedBooleanSimpleClass2 {
> +
> +        public boolean isList(int index) {
> +            return false;
> +        }
> +
> +        public boolean getList() {
> +            return false;
> +        }
> +
> +    }
> +
> +    /*
> +     * SUN: GetterMixedClass1.getList()
> +     * 
> +     * IBM: GetterMixedClass1.isList(int)
> +     */
> +    public void test_MixedBooleanSimpleClass2() throws Exception {
> +        BeanInfo info = Introspector
> +                .getBeanInfo(MixedBooleanSimpleClass2.class);
> +        Method getter = MixedBooleanSimpleClass2.class
> +                .getDeclaredMethod("getList");
> +
> +        for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
> +            if (propertyName.equals(pd.getName())) {
> +                assertFalse(pd instanceof IndexedPropertyDescriptor);
> +                assertEquals(getter, pd.getReadMethod());
> +                assertNull(pd.getWriteMethod());
> +            }
> +        }
> +    }

[ SNIP ]



Re: svn commit: r905181 [2/2] - in /harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/StandardBeanInfo.java test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java

Posted by Kevin Zhou <zh...@gmail.com>.
Hi Mark,

Thanks for pointing it out. It's previously written for helping write those
test cases. I have removed those unnecessary comments now at 905184.

Kevin Zhou

On Mon, Feb 1, 2010 at 2:07 PM, Mark Hindess <ma...@googlemail.com>wrote:

>
> Kevin,
>
> I'm slightly puzzled about the two comments in your recent commit that
> I've included below.  I'm not sure IBM and SUN references make sense in
> this context.  Perhaps you mean Harmony and RI?
>
> Regards,
> -Mark
>
> In message <20...@eris.apache.org>,
> zhoukevin@apache.org
> writes:
> >
> > Modified:
> harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apa
> > che/harmony/beans/tests/java/beans/IntrospectorTest.java
> > URL:
> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/bea
> >
> ns/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.j
> > ava?rev=905181&r1=905180&r2=905181&view=diff
> >
> =============================================================================
> > =
> > ---
> harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/ha
> > rmony/beans/tests/java/beans/IntrospectorTest.java (original)
> > +++
> harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/ha
> > rmony/beans/tests/java/beans/IntrospectorTest.java Mon Feb  1 05:38:20
> 2010
> > @@ -2844,4 +2844,2858 @@
> >          public void setProp1(int n, Integer val) {}
> >      }
> >
> [ SNIP ]
>
> > +
> > +    public class MixedBooleanSimpleClass1 {
> > +
> > +        public boolean isList(int index) {
> > +            return false;
> > +        }
> > +
> > +        public boolean isList() {
> > +            return false;
> > +        }
> > +    }
> > +
> > +    /*
> > +     * SUN: GetterMixedClass1.isList()
> > +     *
> > +     * IBM: GetterMixedClass1.isList(int)
> > +     */
> > +    public void test_MixedBooleanSimpleClass1() throws Exception {
> > +        BeanInfo info = Introspector
> > +                .getBeanInfo(MixedBooleanSimpleClass1.class);
> > +        Method getter = MixedBooleanSimpleClass1.class
> > +                .getDeclaredMethod("isList");
> > +
> > +        for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
> > +            if (propertyName.equals(pd.getName())) {
> > +                assertFalse(pd instanceof IndexedPropertyDescriptor);
> > +                assertEquals(getter, pd.getReadMethod());
> > +                assertNull(pd.getWriteMethod());
> > +            }
> > +        }
> > +    }
> > +
> > +    public class MixedBooleanSimpleClass2 {
> > +
> > +        public boolean isList(int index) {
> > +            return false;
> > +        }
> > +
> > +        public boolean getList() {
> > +            return false;
> > +        }
> > +
> > +    }
> > +
> > +    /*
> > +     * SUN: GetterMixedClass1.getList()
> > +     *
> > +     * IBM: GetterMixedClass1.isList(int)
> > +     */
> > +    public void test_MixedBooleanSimpleClass2() throws Exception {
> > +        BeanInfo info = Introspector
> > +                .getBeanInfo(MixedBooleanSimpleClass2.class);
> > +        Method getter = MixedBooleanSimpleClass2.class
> > +                .getDeclaredMethod("getList");
> > +
> > +        for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
> > +            if (propertyName.equals(pd.getName())) {
> > +                assertFalse(pd instanceof IndexedPropertyDescriptor);
> > +                assertEquals(getter, pd.getReadMethod());
> > +                assertNull(pd.getWriteMethod());
> > +            }
> > +        }
> > +    }
>
> [ SNIP ]
>
>
>


-- 
Best regards,
Yours, Kevin Zhou