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 "Christophe Denis (JIRA)" <ji...@apache.org> on 2007/05/31 15:38:15 UTC
[jira] Created: (AXIS2-2740) [Eclipse Codegen Wizard] comparing NaN
with == isn't permitted
[Eclipse Codegen Wizard] comparing NaN with == isn't permitted
--------------------------------------------------------------
Key: AXIS2-2740
URL: https://issues.apache.org/jira/browse/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;
}
this.localDoubleNumber=param;
}
WRONG: param==java.lang.Double.NaN
isn't allowed because a compare (==) with NaN results everytime with FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Assigned: (AXIS2-2740) [Eclipse Codegen Wizard] comparing
NaN with == isn't permitted
Posted by "Lahiru Sandakith (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lahiru Sandakith reassigned AXIS2-2740:
---------------------------------------
Assignee: Amila Chinthaka Suriarachchi (was: Lahiru Sandakith)
This is an issue of Axis2 code generator generating condition if (param==java.lang.Double.NaN) which was always false because of involvement of NAN ("not a number") of double.
> [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
> --------------------------------------------------------------
>
> Key: AXIS2-2740
> URL: https://issues.apache.org/jira/browse/AXIS2-2740
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: Tools
> Environment: Java EE 5.0
> Reporter: Christophe Denis
> Assignee: Amila Chinthaka Suriarachchi
>
> 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;
> }
> this.localDoubleNumber=param;
> }
> WRONG: param==java.lang.Double.NaN
> isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-2740) [Eclipse Codegen Wizard] comparing
NaN with == isn't permitted
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi resolved AXIS2-2740.
-------------------------------------------------
Resolution: Fixed
fixed with revision 550766. thanks Denis
> [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
> --------------------------------------------------------------
>
> Key: AXIS2-2740
> URL: https://issues.apache.org/jira/browse/AXIS2-2740
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: Tools
> Environment: Java EE 5.0
> Reporter: Christophe Denis
> Assignee: Amila Chinthaka Suriarachchi
>
> 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;
> }
> this.localDoubleNumber=param;
> }
> WRONG: param==java.lang.Double.NaN
> isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Assigned: (AXIS2-2740) [Eclipse Codegen Wizard] comparing
NaN with == isn't permitted
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe reassigned AXIS2-2740:
----------------------------------------
Assignee: Lahiru Sandakith
> [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
> --------------------------------------------------------------
>
> Key: AXIS2-2740
> URL: https://issues.apache.org/jira/browse/AXIS2-2740
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: Tools
> Environment: Java EE 5.0
> Reporter: Christophe Denis
> Assignee: Lahiru Sandakith
>
> 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;
> }
> this.localDoubleNumber=param;
> }
> WRONG: param==java.lang.Double.NaN
> isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-2740) [Eclipse Codegen Wizard] comparing
NaN with == isn't permitted
Posted by "Lahiru Sandakith (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508089 ]
Lahiru Sandakith commented on AXIS2-2740:
-----------------------------------------
Yes agreed, this is a codegen issue.
Can you please attach the wsdl also.
> [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
> --------------------------------------------------------------
>
> Key: AXIS2-2740
> URL: https://issues.apache.org/jira/browse/AXIS2-2740
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: Tools
> Environment: Java EE 5.0
> Reporter: Christophe Denis
> Assignee: Lahiru Sandakith
>
> 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;
> }
> this.localDoubleNumber=param;
> }
> WRONG: param==java.lang.Double.NaN
> isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-2740) [Eclipse Codegen Wizard] comparing NaN
with == isn't permitted
Posted by "Christophe Denis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christophe Denis updated AXIS2-2740:
------------------------------------
Description:
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;
}
this.localDoubleNumber=param;
}
WRONG: param==java.lang.Double.NaN
isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
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
was:
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;
}
this.localDoubleNumber=param;
}
WRONG: param==java.lang.Double.NaN
isn't allowed because a compare (==) with NaN results everytime with FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
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
> [Eclipse Codegen Wizard] comparing NaN with == isn't permitted
> --------------------------------------------------------------
>
> Key: AXIS2-2740
> URL: https://issues.apache.org/jira/browse/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;
> }
> this.localDoubleNumber=param;
> }
> WRONG: param==java.lang.Double.NaN
> isn't allowed because a compare (==) with NaN is everytime resulting FALSE (take a look here: http://www.concentric.net/~Ttwang/tech/javafloat.htm)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org