struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1200412 - /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java
Date Thu, 10 Nov 2011 16:24:27 GMT
Author: mcucchiara
Date: Thu Nov 10 16:24:27 2011
New Revision: 1200412

URL: http://svn.apache.org/viewvc?rev=1200412&view=rev
Log:
Reverted redundant cast (tests failed)

Modified:
    struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java

Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java?rev=1200412&r1=1200411&r2=1200412&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java
(original)
+++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java
Thu Nov 10 16:24:27 2011
@@ -198,8 +198,8 @@ class JSONReader {
             this.addDigits();
         }
 
-        return (this.buf.indexOf(".") >= 0) ? Double.parseDouble(this.buf.toString())
:
-                Long.parseLong(this.buf.toString());
+        return (this.buf.indexOf(".") >= 0) ? (Object) Double.parseDouble(this.buf.toString())
+                : (Object) Long.parseLong(this.buf.toString());
     }
 
     private Object string(char quote) {



Mime
View raw message