[Patch] PropertyDescriptor
Michael Koch
konqueror@gmx.de
Tue Feb 22 18:11:00 GMT 2005
Hi list,
I just commited the attached simple patch to fix an issue pointed out by
mauve that was fixed in GNU classpath already.
Michael
2005-02-22 Jeroen Frijters <jeroen@frijters.net>
* java/beans/PropertyDescriptor.java
(PropertyDescriptor,setReadMethod): Set propertyType.
-------------- next part --------------
Index: java/beans/PropertyDescriptor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/beans/PropertyDescriptor.java,v
retrieving revision 1.7
diff -u -r1.7 PropertyDescriptor.java
--- java/beans/PropertyDescriptor.java 17 Feb 2005 07:48:32 -0000 1.7
+++ java/beans/PropertyDescriptor.java 22 Feb 2005 13:35:31 -0000
@@ -126,7 +126,7 @@
}
// finally check the methods compatibility
- checkMethods(getMethod, setMethod);
+ propertyType = checkMethods(getMethod, setMethod);
}
/** Create a new PropertyDescriptor by introspection.
@@ -178,7 +178,7 @@
"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 @@
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 void setReadMethod(Method readMethod) throws IntrospectionException
{
- checkMethods(readMethod, setMethod);
+ propertyType = checkMethods(readMethod, setMethod);
getMethod = readMethod;
}
More information about the Java-patches
mailing list