Author: luc
Date: Sun Sep  5 19:42:48 2010
New Revision: 992879

URL: http://svn.apache.org/viewvc?rev=992879&view=rev
Log:
fixed checkstyle warnings

Modified:
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math/dfp/DfpMath.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/dfp/DfpMath.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/dfp/DfpMath.java?rev=992879&r1=992878&r2=992879&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/dfp/DfpMath.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/dfp/DfpMath.java
 Sun Sep  5 19:42:48 2010
@@ -321,7 +321,7 @@ public class DfpMath {
         int p2 = 0;
 
         // Check the arguments somewhat here
-        if (a.equals(a.getZero()) || a.lessThan(a.getZero()) || (a.equals(a) 
== false)) {
+        if (a.equals(a.getZero()) || a.lessThan(a.getZero()) || a.isNaN()) {
             // negative, zero or NaN
             a.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID);
             return a.dotrap(DfpField.FLAG_INVALID, "ln", a, 
a.newInstance((byte)1, (byte) Dfp.QNAN));
@@ -524,7 +524,7 @@ public class DfpMath {
         }
 
         if (y.equals(one)) {
-            if (!x.equals(x)) {
+            if (x.isNaN()) {
                 // Test for NaNs
                 x.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID);
                 return x.dotrap(DfpField.FLAG_INVALID, POW_TRAP, x, x);
@@ -532,7 +532,7 @@ public class DfpMath {
             return x;
         }
 
-        if (!x.equals(x) || !y.equals(y)) {
+        if (x.isNaN() || y.isNaN()) {
             // Test for NaNs
             x.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID);
             return x.dotrap(DfpField.FLAG_INVALID, POW_TRAP, x, 
x.newInstance((byte)1, (byte) Dfp.QNAN));


Reply via email to