You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Heigl (JIRA)" <ji...@apache.org> on 2018/09/17 12:12:00 UTC

[jira] [Created] (WICKET-6589) ClientInfo fails with NumberFormatException for unusual browser versions

Thomas Heigl created WICKET-6589:
------------------------------------

             Summary: ClientInfo fails with NumberFormatException for unusual browser versions
                 Key: WICKET-6589
                 URL: https://issues.apache.org/jira/browse/WICKET-6589
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 8.1.0
            Reporter: Thomas Heigl


Determining browser versions from the user agent can fail with an exception. As seen on our PROD environment for the following user agent:

"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.01537112190982"

I'm not sure this is a valid UA, but Wicket should probably never fail with an exception in this case.
{code:java}
Details: java.lang.NumberFormatException: For input string: "01537112190982"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:583)
        at java.lang.Integer.parseInt(Integer.java:615)
        at org.apache.wicket.protocol.http.request.WebClientInfo.setMajorMinorVersionByPattern(WebClientInfo.java:354)
        at org.apache.wicket.protocol.http.request.WebClientInfo.setMozillaProperties(WebClientInfo.java:285)
        at org.apache.wicket.protocol.http.request.WebClientInfo.init(WebClientInfo.java:198)
        at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:112)
        at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:76)
        at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:65)
        at org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:88){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)