harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r433605 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/IndexedPropertyDescriptor.java test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
Date Tue, 22 Aug 2006 11:44:06 GMT
Author: mloenko
Date: Tue Aug 22 04:44:06 2006
New Revision: 433605

URL: http://svn.apache.org/viewvc?rev=433605&view=rev
Log:
applied patch for HARMONY-1236
[classlib][beans] no expected IntrospectionException for ctor IndexedPropertyDescriptor(String,
Class)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java?rev=433605&r1=433604&r2=433605&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
Tue Aug 22 04:44:06 2006
@@ -72,11 +72,15 @@
         String indexedGetterName = createDefaultMethodName(propertyName, "get");
         if(hasMethod(beanClass, indexedGetterName)) {
             setIndexedReadMethod(beanClass, indexedGetterName);
+        } else {
+            throw new IntrospectionException("Method not found: get" + propertyName);
         }
         
         String indexedSetterName = createDefaultMethodName(propertyName, "set");
         if(hasMethod(beanClass, indexedSetterName)) {
             setIndexedWriteMethod(beanClass, indexedSetterName);
+        } else {
+            throw new IntrospectionException("Method not found: set" + propertyName);
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java?rev=433605&r1=433604&r2=433605&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
Tue Aug 22 04:44:06 2006
@@ -348,6 +348,14 @@
         assertFalse(ipd.isExpert());
         assertFalse(ipd.isHidden());
         assertFalse(ipd.isPreferred());
+
+        //Regression for HARMONY-1236
+        try {
+            new IndexedPropertyDescriptor("0xDFRF", Float.TYPE);
+            fail("IntrospectionException expected");
+        } catch (IntrospectionException e) {
+            //expected
+        }
     }
 
     public void testIndexedPropertyDescriptorStringClass_PropertyNameNull()



Mime
View raw message