axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-4924) CLONE -ConverterUtil.compare fails for BigInteger values
Date Thu, 13 Jan 2011 17:57:52 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved AXIS2-4924.
------------------------------------

    Resolution: Invalid

You should not create a clone for this type of request. If you need a fix that has been done
on the trunk, but is not available in any release, you should instead add a comment to the
issue requesting that the fix be merged to the maintenance branch. I did that for AXIS2-4200
and the fix will be available in the next 1.5.5-SNAPSHOT build.

> CLONE -ConverterUtil.compare fails for BigInteger values
> --------------------------------------------------------
>
>                 Key: AXIS2-4924
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4924
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.5.4
>         Environment: Axis2 1.5.4, verified in source code
>            Reporter: Henk Spaan
>             Fix For: 1.5.5
>
>
> Somehow the fix for AXIS2-4200 is not present in version 1.4.
> I have verified this in the source code released with 1.5.4.
> ---- AXIS2-4200 Copied description ----
> A range is defined as:
> 		<xs:restriction base="xs:integer">
> 			<xs:minInclusive value="0"/>
> 			<xs:maxInclusive value="999999999999999"/>
> 		</xs:restriction>
> The generated databinding calls:
>             public void setPhoneNumberType(java.math.BigInteger param){
>                 if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "999999999999999")
<= 0){
>                         this.localPhoneNumberType=param;
>                 }  else {
>                       throw new java.lang.RuntimeException();
>                 }
> The ConverterUtil code is:
>     public static int compare(BigInteger binBigInteger, String value) {
>         return binBigInteger.intValue() - Integer.parseInt(value);
>     }
> This will always fail for values that exceed the capacity of a java.lang.Integer with:
>   Caused by: java.lang.NumberFormatException: For input string: "999999999999999"
>           at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>           at java.lang.Integer.parseInt(Integer.java:459)
>           at java.lang.Integer.parseInt(Integer.java:497)
>           at org.apache.axis2.databinding.utils.ConverterUtil.compare(ConverterUtil.java:1281)
>           [...]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message