Fix PMD violations from ShortMethodName rule, issue #982
This commit is contained in:
parent
f9a9d6c3d3
commit
4ac32a7c0c
|
|
@ -165,7 +165,6 @@
|
|||
<exclude name="AvoidFieldNameMatchingMethodName"/>
|
||||
<exclude name="LongVariable"/>
|
||||
<exclude name="ShortClassName"/>
|
||||
<exclude name="ShortMethodName"/>
|
||||
<exclude name="ShortVariable"/>
|
||||
</rule>
|
||||
<rule ref="rulesets/java/optimizations.xml">
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ public abstract class ExpressionHandler
|
|||
{
|
||||
final String line = indentCheck.getLine(lineNum - 1);
|
||||
final int start = getLineStart(line);
|
||||
if (indentLevel.gt(start)) {
|
||||
if (indentLevel.greaterThan(start)) {
|
||||
logChildError(lineNum, start, indentLevel);
|
||||
}
|
||||
}
|
||||
|
|
@ -369,7 +369,7 @@ public abstract class ExpressionHandler
|
|||
// error if this statement starts the line and it is less than
|
||||
// the correct indentation level
|
||||
if (mustMatch ? !indentLevel.accept(start)
|
||||
: colNum == start && indentLevel.gt(start))
|
||||
: colNum == start && indentLevel.greaterThan(start))
|
||||
{
|
||||
logChildError(lineNum, start, indentLevel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class IndentLevel
|
|||
* @return true if <code>indent</code> less then minimal of
|
||||
* acceptable indentation levels, false otherwise.
|
||||
*/
|
||||
public boolean gt(int indent)
|
||||
public boolean greaterThan(int indent)
|
||||
{
|
||||
return levels.nextSetBit(0) > indent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue