2005-02-22 Jeroen Frijters <jeroen@frijters.net>
authorJeroen Frijters <jeroen@frijters.net>
Tue, 22 Feb 2005 14:06:53 +0000 (14:06 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Tue, 22 Feb 2005 14:06:53 +0000 (14:06 +0000)
* java/beans/PropertyDescriptor.java
(PropertyDescriptor,setReadMethod): Set propertyType.

From-SVN: r95393

libjava/ChangeLog
libjava/java/beans/PropertyDescriptor.java

index 13d475129cdbe3df3241f4ed423c64cd786b5851..8eb46e4eb939d55cf599fca66b8deee0afc0f677 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-22  Jeroen Frijters  <jeroen@frijters.net>
+
+       * java/beans/PropertyDescriptor.java
+       (PropertyDescriptor,setReadMethod): Set propertyType.
+
 2005-02-22  Michael Koch  <konqueror@gmx.de>
 
        * java/nio/DirectByteBufferImpl.java
index 84c31763023835ec934d385903520cccd1cb4c69..57ed4f8cadffd3b1ba2baa665f479a79fbc36cee 100644 (file)
@@ -126,7 +126,7 @@ public class PropertyDescriptor extends FeatureDescriptor
         }
 
         // finally check the methods compatibility        
-        checkMethods(getMethod, setMethod);
+        propertyType = checkMethods(getMethod, setMethod);
     }
 
     /** Create a new PropertyDescriptor by introspection.
@@ -178,7 +178,7 @@ public class PropertyDescriptor extends FeatureDescriptor
                 "Cannot find a setter method called " + setMethodName);
         }
 
-        checkMethods(getMethod, setMethod);
+        propertyType = checkMethods(getMethod, setMethod);
     }
 
     /** Create a new PropertyDescriptor using explicit Methods.
@@ -205,17 +205,7 @@ public class PropertyDescriptor extends FeatureDescriptor
         setName(name);
         getMethod = readMethod;
         setMethod = writeMethod;
-
-        if (getMethod != null)
-        {
-            this.propertyType = getMethod.getReturnType();
-        }
-        else if (setMethod != null)
-        {
-            this.propertyType = setMethod.getParameterTypes()[0];
-        }
-
-        checkMethods(getMethod, setMethod);
+        propertyType = checkMethods(getMethod, setMethod);
     }
 
     /** Get the property type.
@@ -250,7 +240,7 @@ public class PropertyDescriptor extends FeatureDescriptor
      */
     public void setReadMethod(Method readMethod) throws IntrospectionException
     {
-        checkMethods(readMethod, setMethod);
+        propertyType = checkMethods(readMethod, setMethod);
 
         getMethod = readMethod;
     }