commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r534013 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
Date Tue, 01 May 2007 11:32:53 GMT
Author: niallp
Date: Tue May  1 04:32:52 2007
New Revision: 534013

URL: http://svn.apache.org/viewvc?view=rev&rev=534013
Log:
Reduce the setDefaultValue() method's visibility from public to protected, as per comments
on BEANUTILS-258 

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java?view=diff&rev=534013&r1=534012&r2=534013
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
Tue May  1 04:32:52 2007
@@ -109,32 +109,6 @@
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Set the default value, converting as required.
-     * <p>
-     * If the default value is different from the type the
-     * <code>Converter</code> handles, it will be converted
-     * to the handled type.
-     *
-     * @param defaultValue The default value to be returned
-     * if the value to be converted is missing or an error
-     * occurs converting the value.
-     * @throws ConversionException if an error occurs converting
-     * the default value
-     */
-    public void setDefaultValue(Object defaultValue) {
-        useDefault = false;
-        if (log.isDebugEnabled()) {
-            log.debug("Setting default value: " + defaultValue);
-        }
-        if (defaultValue == null) {
-           this.defaultValue  = null;
-        } else {
-           this.defaultValue  = convert(getDefaultType(), defaultValue);
-        }
-        useDefault = true;
-    }
-
-    /**
      * Convert the input object into an output object of the
      * specified type.
      *
@@ -301,6 +275,32 @@
         }
         throw cex;
 
+    }
+
+    /**
+     * Set the default value, converting as required.
+     * <p>
+     * If the default value is different from the type the
+     * <code>Converter</code> handles, it will be converted
+     * to the handled type.
+     *
+     * @param defaultValue The default value to be returned
+     * if the value to be converted is missing or an error
+     * occurs converting the value.
+     * @throws ConversionException if an error occurs converting
+     * the default value
+     */
+    protected void setDefaultValue(Object defaultValue) {
+        useDefault = false;
+        if (log.isDebugEnabled()) {
+            log.debug("Setting default value: " + defaultValue);
+        }
+        if (defaultValue == null) {
+           this.defaultValue  = null;
+        } else {
+           this.defaultValue  = convert(getDefaultType(), defaultValue);
+        }
+        useDefault = true;
     }
 
     /**



---------------------------------------------------------------------
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