forked from phoedos/pmd
false + for double literals in AvoidUsingOctalValues
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4804 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -19,6 +19,7 @@ public class AvoidUsingOctalValuesTest extends SimpleAggregatorTst {
|
||||
new TestDescriptor(TEST1, "bad, 012", 1, rule),
|
||||
new TestDescriptor(TEST2, "OK, hex value", 0, rule),
|
||||
new TestDescriptor(TEST3, "OK, long value", 0, rule),
|
||||
new TestDescriptor(TEST4, "OK, double value", 0, rule),
|
||||
});
|
||||
}
|
||||
|
||||
@ -37,4 +38,9 @@ public class AvoidUsingOctalValuesTest extends SimpleAggregatorTst {
|
||||
" long x = 0L;" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
private static final String TEST4 =
|
||||
"public class Foo {" + PMD.EOL +
|
||||
" double d = 0.1;" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
}
|
||||
|
@ -1100,6 +1100,7 @@ public class Test {
|
||||
//Literal
|
||||
[(starts-with(@Image, 0))]
|
||||
[string-length(@Image)>1]
|
||||
[not(contains(@Image, '.'))]
|
||||
[not(substring(@Image, 2, 1) = 'x')]
|
||||
[not(substring(@Image, 2, 1) = 'L')]
|
||||
]]>
|
||||
|
Reference in New Issue
Block a user