diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/CommentManager.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/CommentManager.java index 59ea60d9a..6844a9eba 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/CommentManager.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/CommentManager.java @@ -162,7 +162,9 @@ public class CommentManager } /** - * Returns the Javadoc comment before the specified line. null is none. + * Returns the Javadoc comment before the specified line. + * A return value of null means there is no such + * comment. * @return the Javadoc comment, or null if none * @param aLineNo the line number to check before **/ diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FileContents.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FileContents.java index 439385b63..340707dce 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FileContents.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FileContents.java @@ -97,13 +97,14 @@ public class FileContents } /** - * Returns the Javadoc comment before the specified line. null is none. + * Returns the Javadoc comment before the specified line. + * A return value of null means there is no such comment. * @return the Javadoc comment, or null if none * @param aLineNo the line number to check before **/ public String[] getJavadocBefore(int aLineNo) { - // Lines start at 1 to the callers perspective, so nee to take off 2 + // Lines start at 1 to the callers perspective, so need to take off 2 int lineNo = aLineNo - 2; // skip blank lines