You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sa...@apache.org on 2002/10/22 08:48:32 UTC
cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils PropertyUtils.java
sanders 2002/10/21 23:48:32
Modified: beanutils/src/java/org/apache/commons/beanutils
PropertyUtils.java
Log:
patch to bug 12544, contributed by Brian Ely with minor modifications.
Revision Changes Path
1.32 +12 -9 jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java
Index: PropertyUtils.java
===================================================================
RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- PropertyUtils.java 24 Sep 2002 18:45:54 -0000 1.31
+++ PropertyUtils.java 22 Oct 2002 06:48:32 -0000 1.32
@@ -877,9 +877,12 @@
PropertyDescriptor result = null;
FastHashMap mappedDescriptors =
getMappedPropertyDescriptors(bean);
- if (mappedDescriptors != null) {
- result = (PropertyDescriptor) mappedDescriptors.get(name);
+ if (mappedDescriptors == null) {
+ mappedDescriptors = new FastHashMap();
+ mappedDescriptors.setFast(true);
+ mappedDescriptorsCache.put(bean.getClass(), mappedDescriptors);
}
+ result = (PropertyDescriptor) mappedDescriptors.get(name);
if (result == null) {
// not found, try to create it
try {
@@ -887,9 +890,9 @@
new MappedPropertyDescriptor(name, bean.getClass());
} catch (IntrospectionException ie) {
}
- }
- if (result != null) {
- mappedDescriptorsCache.put(name, result);
+ if (result != null) {
+ mappedDescriptors.put(name, result);
+ }
}
return result;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>