[RFC][icedtea-web] Fix NumberFormatException in PluginParameters

Thomas Meyer thomas at m3y3r.de
Sat Mar 9 09:51:04 PST 2013


Hi,

Maybe introduced by changeset 741a105054af (Remove redundant HTML-tag
scanner from ITW. Do not reconstruct tags.)

Handling message: GetJavaObject instance 3 Worker #1/IsPriority=false/IsFree=false/Message=instance 3 reference -161 GetJavaObject
Exception in thread "NetXPanel initializer" java.lang.NumberFormatException: For input string: "4294967295"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:495)
	at java.lang.Integer.valueOf(Integer.java:582)
	at net.sourceforge.jnlp.PluginParameters.getWidth(PluginParameters.java:154)
	at sun.applet.PluginAppletPanelFactory$2.run(PluginAppletPanelFactory.java:104)
	at java.lang.Thread.run(Thread.java:722)

Proposed fix:

diff -r e19fe33c82df plugin/icedteanp/java/sun/applet/PluginParameterParser.java
--- a/plugin/icedteanp/java/sun/applet/PluginParameterParser.java	Tue Mar 05 16:35:40 2013 -0500
+++ b/plugin/icedteanp/java/sun/applet/PluginParameterParser.java	Sat Mar 09 18:50:17 2013 +0100
@@ -1,6 +1,5 @@
 package sun.applet;
 
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -60,7 +59,12 @@
     }
 
     static boolean isInt(String s) {
-        return s.matches("^-?\\d+$");
+        try{
+            Integer.parseInt(s);
+            return true;
+        } catch(NumberFormatException e) {
+            return false;
+        }
     }
 
     /**





More information about the distro-pkg-dev mailing list