You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jarek Gawor (JIRA)" <ax...@ws.apache.org> on 2006/07/06 18:09:30 UTC
[jira] Resolved: (AXIS-2327) ClassCastException in UnsignedInt and
UnsignedLong
[ http://issues.apache.org/jira/browse/AXIS-2327?page=all ]
Jarek Gawor resolved AXIS-2327:
-------------------------------
Fix Version: current (nightly)
Resolution: Fixed
Committed a fix for this issue and added tests.
> ClassCastException in UnsignedInt and UnsignedLong
> --------------------------------------------------
>
> Key: AXIS-2327
> URL: http://issues.apache.org/jira/browse/AXIS-2327
> Project: Apache Axis
> Type: Bug
> Components: Basic Architecture
> Versions: 1.3
> Environment: JDK 1.4.2, JDK 1.5, Axis 1.1 - 1.3
> Reporter: Martin Renner
> Fix For: current (nightly)
>
> The following code raises a ClassCastException in UnsignedInt.compareTo().
> --------------------
> import org.apache.axis.types.UnsignedInt;
> public class Test {
> public static void main(String[] args) throws Exception {
> UnsignedInt i1 = new UnsignedInt(10);
> UnsignedInt i2 = new UnsignedInt(20);
> System.out.println(i1.compareTo(i2));
> }
> }
> --------------------
> The reason for this bug is the following code in UnsignedInt.compareTo():
> return lValue.compareTo(obj);
> which resolves to (symbolically)
> return Long.compareTo(UnsignedInt)
> which is not allowed.
> The same bug exists in UnsignedLong, which makes it impossible to use
> UnsignedByte
> UnsignedShort
> UnsignedInt
> UnsignedLong
> in Maps etc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org