axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Resolved: (AXIS-2327) ClassCastException in UnsignedInt and UnsignedLong
Date Thu, 06 Jul 2006 16:09:30 GMT
     [ 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


Mime
View raw message