Skip to content

Commit

Permalink
minor: practice what you preach(checkstyle#8764)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmancuso committed Aug 27, 2020
1 parent 82fdfcf commit a443917
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/puppycrawl/tools/checkstyle/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,14 @@ private static final class OnlyCheckstyleLoggersFilter implements Filter {
private final String packageName = Main.class.getPackage().getName();

/**
* Returns whether the specified record should be logged.
* Returns whether the specified logRecord should be logged.
*
* @param record the record to log
* @param logRecord the logRecord to log
* @return true if the logger name is in the package of this class or a subpackage
*/
@Override
public boolean isLoggable(LogRecord record) {
return record.getLoggerName().startsWith(packageName);
public boolean isLoggable(LogRecord logRecord) {
return logRecord.getLoggerName().startsWith(packageName);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public void checkIndentation() {
* Check the indentation of the yield keyword.
*/
private void checkYield() {
final DetailAST yield = getMainAst();
final int columnNo = expandedTabsColumnNo(yield);
if (isOnStartOfLine(yield) && !getIndent().isAcceptable(columnNo)) {
logError(yield, "", columnNo);
final DetailAST yieldKey = getMainAst();
final int columnNo = expandedTabsColumnNo(yieldKey);
if (isOnStartOfLine(yieldKey) && !getIndent().isAcceptable(columnNo)) {
logError(yieldKey, "", columnNo);
}
}
}

0 comments on commit a443917

Please sign in to comment.