NumberFormatException for new UnsignedLong( double )
----------------------------------------------------
Key: AXIS-2587
URL: http://issues.apache.org/jira/browse/AXIS-2587
Project: Apache Axis
Issue Type: Bug
Components: Basic Architecture
Affects Versions: current (nightly)
Reporter: Alexis Reigel
The double constructor for the class org.apache.axis.types.UnsignedLong raises
a NumberFormatException exception if the argument is a double value.
E.g.
<code>UnsignedLong ulong = new UnsignedLong(1D);</code>
The Problem lies in the constructor itself. The line
<code>new BigInteger(Double.toString(value))</code>
calls the constructor of java.lang.BigInteger which expects a string defined as
follows: "The String representation consists of an optional minus sign followed
by a sequence of one or more decimal digits". In the case of a double value
this fails of course.
I'm not sure about the purpose of this constructor anyway. Why would you want
to create a long from a double?
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]