Enable PMD rule AvoidInstanceofChecksInCatchClause and fix violations
This commit is contained in:
parent
30be64cbbe
commit
1bff48b649
2 changed files with 2 additions and 4 deletions
|
@ -805,10 +805,9 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
||||||
for (int i = 0; i < minWriteIdx; i++) {
|
for (int i = 0; i < minWriteIdx; i++) {
|
||||||
variableData[i] = readOnlyData[i];
|
variableData[i] = readOnlyData[i];
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (IllegalArgumentException e) {
|
||||||
if (e instanceof IllegalArgumentException) {
|
|
||||||
throw new IllegalArgumentException("ParseException " + file + " at line " + linenr + ": " + e.getMessage());
|
throw new IllegalArgumentException("ParseException " + file + " at line " + linenr + ": " + e.getMessage());
|
||||||
}
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
if (expressionList.size() == 0) {
|
if (expressionList.size() == 0) {
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<exclude name="AssignmentToNonFinalStatic" />
|
<exclude name="AssignmentToNonFinalStatic" />
|
||||||
<exclude name="AvoidBranchingStatementAsLastInLoop" />
|
<exclude name="AvoidBranchingStatementAsLastInLoop" />
|
||||||
<exclude name="AvoidCatchingThrowable" />
|
<exclude name="AvoidCatchingThrowable" />
|
||||||
<exclude name="AvoidInstanceofChecksInCatchClause" />
|
|
||||||
<exclude name="AvoidProtectedFieldInFinalClass" />
|
<exclude name="AvoidProtectedFieldInFinalClass" />
|
||||||
<exclude name="AvoidUsingVolatile" />
|
<exclude name="AvoidUsingVolatile" />
|
||||||
<exclude name="CloseResource" />
|
<exclude name="CloseResource" />
|
||||||
|
|
Loading…
Reference in a new issue