Merge pull request #3396 from oowekyala:update-ComparisonWithNaN
[java] Update rule ComparisonWithNaN #3396
This commit is contained in:
3 files changed
+2
-3
No files matched your search
@@ -202,7 +202,7 @@
|
||||
<!-- <rule ref="category/java/errorprone.xml/CloneThrowsCloneNotSupportedException"/> -->
|
||||
<!-- <rule ref="category/java/errorprone.xml/CloseResource"/> -->
|
||||
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals"/>
|
||||
<!-- <rule ref="category/java/errorprone.xml/ComparisonWithNaN"/> -->
|
||||
<rule ref="category/java/errorprone.xml/ComparisonWithNaN"/>
|
||||
<rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod"/>
|
||||
<!-- <rule ref="category/java/errorprone.xml/DataflowAnomalyAnalysis"/> -->
|
||||
<!-- <rule ref="category/java/errorprone.xml/DetachedTestCase"/> -->
|
||||
|
||||
@@ -1146,7 +1146,7 @@ class Foo {
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
(//EqualityExpression | //RelationalExpression)/PrimaryExpression/PrimaryPrefix/Name[@Image='Double.NaN' or @Image='Float.NaN']
|
||||
//InfixExpression[@Operator = ("==", "!=", "<=", ">=", "<", ">")]/FieldAccess[@Name='NaN' and (pmd-java:typeIs('double') or pmd-java:typeIs('float'))]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.rule.errorprone;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
@org.junit.Ignore("Rule has not been updated yet")
|
||||
public class ComparisonWithNaNTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
Reference in new issue
Block a user