Fix PMD violations from ShortMethodName rule, issue #982

This commit is contained in:
Michal Kordas 2015-04-24 21:21:29 +02:00
parent f9a9d6c3d3
commit 4ac32a7c0c
3 changed files with 3 additions and 4 deletions

View File

@ -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">

View File

@ -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);
}

View File

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