[java] Update rule DontUseFloatTypeForLoopIndices
This commit is contained in:
@@ -209,7 +209,7 @@
|
||||
<!-- <rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard"/> -->
|
||||
<!-- <rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"/> -->
|
||||
<rule ref="category/java/errorprone.xml/DontImportSun"/>
|
||||
<!-- <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/> -->
|
||||
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyFinalizer"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
|
||||
|
@@ -1441,8 +1441,7 @@ performance need (space or time).
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//ForStatement/ForInit/LocalVariableDeclaration
|
||||
/Type/PrimitiveType[@Image="float"]
|
||||
//ForStatement/ForInit//VariableDeclaratorId[pmd-java:typeIs('float')]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
@@ -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 DontUseFloatTypeForLoopIndicesTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<test-code>
|
||||
<description>basic test case</description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-linenumbers>5</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
public class Count {
|
||||
public static void main(String[] args) {
|
||||
|
Reference in New Issue
Block a user