You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2007/05/12 19:04:17 UTC
[jira] Closed: (WICKET-407) Browser version in ClientProperties
should be an Integer
[ https://issues.apache.org/jira/browse/WICKET-407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag closed WICKET-407.
-------------------------------------
Resolution: Won't Fix
Fix Version/s: 1.3
ClientProperties has been completely reworked. The new version should not have the problem.
> Browser version in ClientProperties should be an Integer
> --------------------------------------------------------
>
> Key: WICKET-407
> URL: https://issues.apache.org/jira/browse/WICKET-407
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.2.5
> Environment: Wicket 1.2.5
> JDK 5
> Jetty 6
> Reporter: RĂ¼diger Schulz
> Priority: Minor
> Fix For: 1.3
>
>
> When calling
> ClientProperties.getInt(ClientProperties.BROWSER_VERSION_MAJOR, 0) or
> ClientProperties.getInt(ClientProperties.BROWSER_VERSION_MINOR, 0)
> an Exception is thrown:
> java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
> at wicket.protocol.http.ClientProperties.getInt(ClientProperties.java:402)
> Looking at WebClientInfo, I see that both of these values are converted from int to String. getInt() then just tries to cast to Integer.
> I think both values should be stored as an Integer, so that easy number comparisons can be made.
> Otherwise, one would have to convert the String to an int again.
> Diff for WebClientInfo:
> 156,157c156,157
> < properties.setProperty(ClientProperties.BROWSER_VERSION_MAJOR, Integer
> < .toString(majorVersion));
> ---
> > properties.setProperty(ClientProperties.BROWSER_VERSION_MAJOR, new Integer
> > (majorVersion));
> 162,163c162,163
> < properties.setProperty(ClientProperties.BROWSER_VERSION_MINOR, Integer
> < .toString(minorVersion));
> ---
> > properties.setProperty(ClientProperties.BROWSER_VERSION_MINOR, new Integer
> > (minorVersion));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.