diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FullIdent.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FullIdent.java index 1d6dcae62..0a11dcc87 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FullIdent.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FullIdent.java @@ -31,10 +31,8 @@ package com.puppycrawl.tools.checkstyle.api; * * @author Oliver Burn **/ -public class FullIdent +public final class FullIdent { - // TODO: We should hide public default constructor. - /** the string **/ private final StringBuffer mBuffer = new StringBuffer(); /** the line number **/ @@ -42,6 +40,11 @@ public class FullIdent /** the column number **/ private int mColNo; + /** hide default constructor */ + private FullIdent() + { + } + /** @return the text **/ public String getText() { @@ -112,7 +115,6 @@ public class FullIdent */ private static void extractFullIdent(FullIdent aFull, DetailAST aAST) { - // A guard to be paranoid if (aAST == null) { return; } diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/JavadocMethodCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/JavadocMethodCheck.java index 6f088ba81..2bd80ac1a 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/JavadocMethodCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/JavadocMethodCheck.java @@ -160,7 +160,7 @@ public class JavadocMethodCheck /** @see com.puppycrawl.tools.checkstyle.api.Check */ public void beginTree() { - mPackageFullIdent = new FullIdent(); + mPackageFullIdent = FullIdent.createFullIdent(null); mImports.clear(); }