commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r539519 - in /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils: BeanUtils.java ConvertUtilsBean.java WrapDynaClass.java
Date Fri, 18 May 2007 16:50:45 GMT
Author: niallp
Date: Fri May 18 09:50:40 2007
New Revision: 539519

URL: http://svn.apache.org/viewvc?view=rev&rev=539519
Log:
BEANUTILS-278 Remove references to FastHashMap that have no impact on the API (and very little
performance impact)

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtils.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/WrapDynaClass.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtils.java?view=diff&rev=539519&r1=539518&r2=539519
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtils.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtils.java
Fri May 18 09:50:40 2007
@@ -21,7 +21,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.Map;
 
-import org.apache.commons.collections.FastHashMap;
 
 
 /**
@@ -45,15 +44,6 @@
 
     // ------------------------------------------------------ Private Variables
 
-
-    /**
-     * Dummy collection from the Commons Collections API, to force a
-     * ClassNotFoundException if commons-collections.jar is not present in the
-     * runtime classpath, and this class is the first one referenced.
-     * Otherwise, the ClassNotFoundException thrown by ConvertUtils or
-     * PropertyUtils can get masked.
-     */
-    private static final FastHashMap dummy = new FastHashMap();
 
     /**
      * The debugging detail level for this component.

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java?view=diff&rev=539519&r1=539518&r2=539519
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
Fri May 18 09:50:40 2007
@@ -27,6 +27,9 @@
 import java.sql.Date;
 import java.sql.Time;
 import java.sql.Timestamp;
+import java.util.Collections;
+import java.util.Map;
+import java.util.HashMap;
 import org.apache.commons.beanutils.converters.BigDecimalConverter;
 import org.apache.commons.beanutils.converters.BigIntegerConverter;
 import org.apache.commons.beanutils.converters.BooleanConverter;
@@ -53,7 +56,6 @@
 import org.apache.commons.beanutils.converters.StringConverter;
 import org.apache.commons.beanutils.converters.StringArrayConverter;
 import org.apache.commons.beanutils.converters.URLConverter;
-import org.apache.commons.collections.FastHashMap;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -151,7 +153,7 @@
      * The set of {@link Converter}s that can be used to convert Strings
      * into objects of a specified Class, keyed by the destination Class.
      */
-    private FastHashMap converters = new FastHashMap();
+    private Map converters = Collections.synchronizedMap(new HashMap());
 
     /**
      * The <code>Log</code> instance for this class.
@@ -162,9 +164,7 @@
 
     /** Construct a bean with standard converters registered */
     public ConvertUtilsBean() {
-        converters.setFast(false);
         deregister();
-        converters.setFast(true);
     }
 
     // --------------------------------------------------------- Public Methods

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/WrapDynaClass.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/WrapDynaClass.java?view=diff&rev=539519&r1=539518&r2=539519
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/WrapDynaClass.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/WrapDynaClass.java
Fri May 18 09:50:40 2007
@@ -277,7 +277,7 @@
         if (regulars == null) {
             regulars = new PropertyDescriptor[0];
         }
-        HashMap mappeds =
+        Map mappeds =
                 PropertyUtils.getMappedPropertyDescriptors(beanClass);
         if (mappeds == null) {
             mappeds = new HashMap();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message