Commits

davsclaus  committed 35ddaa5

XW-512: Rollback of XW-490 as it caused sideeffect in Strtuts2 of its generation of urls containg numbers

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1501e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits c1fb11d
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (2)

File src/java/com/opensymphony/xwork2/util/XWorkBasicConverter.java

         }
 
         if (toType == String.class) {
-            Class inputType = value.getClass();
+            /* the code below has been disabled as it causes sideffects in Strtus2 (XW-512)
             // if input (value) is a number then use special conversion method (XW-490)
+            Class inputType = value.getClass();
             if (Number.class.isAssignableFrom(inputType)) {
                 result = doConvertFromNumberToString(context, value, inputType);
                 if (result != null) {
                     return result;
                 }
-            }
+            }*/
             // okay use default string conversion
             result = doConvertToString(context, value);
         } else if (toType == boolean.class) {

File src/test/com/opensymphony/xwork2/util/XWorkBasicConverterTest.java

 /*
- * Copyright (c) 2002-2006 by OpenSymphony
+ * Copyright (c) 2002-2007 by OpenSymphony
  * All rights reserved.
  */
 package com.opensymphony.xwork2.util;
  */
 public class XWorkBasicConverterTest extends TestCase {
 
-    public void test() {
-        // TODO: test for every possible conversion
-        // take into account of empty string
-        // primitive -> conversion error when empty string is passed
-        // object -> return null when empty string is passed
-    }
-
-    // TODO: more test will come soon !!!
+    // TODO: test for every possible conversion
+    // take into account of empty string
+    // primitive -> conversion error when empty string is passed
+    // object -> return null when empty string is passed
 
     public void testDateConversionWithEmptyValue() {
         XWorkBasicConverter basicConverter = new XWorkBasicConverter();
         }
     }
 
+    /* the code below has been disabled as it causes sideffects in Strtus2 (XW-512)
     public void testXW490ConvertStringToDobule() throws Exception {
         Locale locale = new Locale("DA"); // let's use a not common locale such as Denmark
 
         // output should be formatted according to Danish locale using , as decimal seperator
         assertEquals("123,99", value);
     }
+    */
 }