axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Denis (JIRA)" <>
Subject [jira] Created: (AXIS2-2740) [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
Date Thu, 31 May 2007 13:38:15 GMT
[Eclipse Codegen Wizard] comparing NaN with == isn't permitted

                 Key: AXIS2-2740
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
         Environment: Java EE 5.0
            Reporter: Christophe Denis

Hello all,

The Eclipse Code Generator Plugin Version 1.2 generates some bad code when making a wsdl to
java. In generated types there is a pieces of code like that:

protected double localDoubleNumber ;
// [...]
protected boolean localDoubleNumberTracker = false ;
// [...]
public void setDoubleNumber(double param){
    // setting primitive attribute tracker to true
    if (param==java.lang.Double.NaN) {
        localDoubleNumberTracker = false;
    } else {
    localDoubleNumberTracker = true;

WRONG: param==java.lang.Double.NaN
isn't allowed because a compare (==) with NaN results everytime with FALSE (take a look here:
The result of that bug is, that all elements are tracked, even if they have no value

RIGHT: java.lang.Double.isNAN(param)

Greetings, Christophe Denis

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:
For additional commands, e-mail:

View raw message