You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2016/11/17 17:53:48 UTC

svn commit: r1770251 - /myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Author: weber
Date: Thu Nov 17 17:53:48 2016
New Revision: 1770251

URL: http://svn.apache.org/viewvc?rev=1770251&view=rev
Log:
TOBAGO-1626 - Possible NumberFormatException when decoding tree

Modified:
    myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Modified: myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java?rev=1770251&r1=1770250&r2=1770251&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java (original)
+++ myfaces/tobago/branches/tobago-2.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java Thu Nov 17 17:53:48 2016
@@ -506,11 +506,11 @@ public class RenderUtils {
         LOG.warn("Can't parse: '{}'", value);
         return null;
       }
-      final int left = Integer.parseInt(value.substring(0, sep));
-      final int top = Integer.parseInt(value.substring(sep + 1));
+      final Double left = Double.parseDouble(value.substring(0, sep));
+      final Double top = Double.parseDouble(value.substring(sep + 1));
       position = new Integer[2];
-      position[0] = left;
-      position[1] = top;
+      position[0] = left.intValue();
+      position[1] = top.intValue();
     }
     return position;
   }