Author: ivaynberg
Date: Thu Jun 19 10:23:48 2008
New Revision: 669577

URL: http://svn.apache.org/viewvc?rev=669577&view=rev
Log:
WICKET-1706: org.apache.wicket.util.lang.Objects.convertValue returns null if 
it cannot convert the value

Modified:
    
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/Objects.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/Objects.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/Objects.java?rev=669577&r1=669576&r2=669577&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/Objects.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/Objects.java
 Thu Jun 19 10:23:48 2008
@@ -621,7 +621,7 @@
         * @return converted value of the type given, or value if the value 
cannot be converted to the
         *         given type.
         */
-       public static Object convertValue(Object value, Class toType)
+       public static Object convertValue(final Object value, final Class 
toType)
        {
                Object result = null;
 
@@ -693,7 +693,8 @@
                                result = primitiveDefaults.get(toType);
                        }
                }
-               return result;
+
+               return (result != null) ? result : value;
        }
 
        /**


Reply via email to