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:
Xavier Le Vourch
2006-11-16 19:35:19 +00:00
parent 49c1d3aff0
commit 2462c9637b
2 changed files with 7 additions and 0 deletions

View File

@ -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 +
"}";
}

View File

@ -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')]
]]>