Dogfood now contains MissingBreakInSwitch.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6274 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
1 parent
7c9b3021d0
commit
0839364579
2 files changed
+2
-30
No files matched your search
@@ -43,7 +43,6 @@
|
||||
<exclude name="AvoidFinalLocalVariable"/>
|
||||
<exclude name="DataflowAnomalyAnalysis"/>
|
||||
<exclude name="AssignmentInOperand"/>
|
||||
<!-- TODO Work towards enabling the following, disabled for now because of failing code -->
|
||||
<exclude name="NullAssignment"/>
|
||||
</rule>
|
||||
<rule ref="rulesets/controversial.xml/AssignmentInOperand">
|
||||
@@ -88,7 +87,6 @@
|
||||
<exclude name="UseCollectionIsEmpty"/>
|
||||
<exclude name="AccessorClassGeneration"/>
|
||||
<exclude name="SimplifyBooleanExpressions"/>
|
||||
<exclude name="MissingBreakInSwitch"/>
|
||||
<exclude name="CompareObjectsWithEquals"/>
|
||||
<exclude name="SimplifyBooleanReturns"/>
|
||||
</rule>
|
||||
|
||||
+2
-28
@@ -67,36 +67,10 @@ public class SuspiciousOctalEscapeRule extends AbstractJavaRule {
|
||||
}
|
||||
|
||||
private boolean isOctal(char c) {
|
||||
switch (c) {
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return c >= '0' && c <= '7';
|
||||
}
|
||||
|
||||
private boolean isDecimal(char c) {
|
||||
switch (c) {
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return c >= '0' && c <= '9';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user