From 303cbce950cf31dcfc4df19414a37fe577fc09e1 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sat, 28 Aug 2004 10:32:11 +0000 Subject: [PATCH] Tighten up code --- .../checkstyle/checks/indentation/AssignHandler.java | 2 +- .../checkstyle/checks/indentation/BlockParentHandler.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/AssignHandler.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/AssignHandler.java index cd837ad46..bacc990a8 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/AssignHandler.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/AssignHandler.java @@ -50,7 +50,7 @@ public class AssignHandler extends BlockParentHandler final IndentLevel expectedLevel = getChildrenExpectedLevel(); // check indentation of assign if it starts line - DetailAST assign = getMainAst(); + final DetailAST assign = getMainAst(); if (startsLine(assign) && !expectedLevel.accept(expandedTabsColumnNo(assign))) { diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java index 447070401..79ee0f5d5 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java @@ -80,7 +80,7 @@ public class BlockParentHandler extends ExpressionHandler */ protected void checkToplevelToken() { - DetailAST toplevel = getToplevelAST(); + final DetailAST toplevel = getToplevelAST(); if (toplevel == null || getLevel().accept(expandedTabsColumnNo(toplevel))) @@ -130,7 +130,7 @@ public class BlockParentHandler extends ExpressionHandler */ protected DetailAST getRCurly() { - DetailAST slist = getMainAst().findFirstToken(TokenTypes.SLIST); + final DetailAST slist = getMainAst().findFirstToken(TokenTypes.SLIST); if (slist == null) { return null; } @@ -145,8 +145,8 @@ public class BlockParentHandler extends ExpressionHandler { // the lcurly can either be at the correct indentation, or nested // with a previous expression - DetailAST lcurly = getLCurly(); - int lcurlyPos = expandedTabsColumnNo(lcurly); + final DetailAST lcurly = getLCurly(); + final int lcurlyPos = expandedTabsColumnNo(lcurly); if (lcurly == null || curlyLevel().accept(lcurlyPos)