minor: methods made static

This commit is contained in:
rnveach 2015-10-31 23:46:22 -04:00 committed by Roman Ivanov
parent 094934929f
commit da2d75a178
1 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ public class CommentsIndentationCheck extends Check {
* @param comment single line comment.
* @return the previous statement of a single line comment.
*/
private DetailAST getPreviousStatementOfSingleLineComment(DetailAST comment) {
private static DetailAST getPreviousStatementOfSingleLineComment(DetailAST comment) {
final DetailAST prevStatement;
if (isDistributedPreviousStatement(comment)) {
prevStatement = getDistributedPreviousStatementOfSingleLineComment(comment);
@ -184,7 +184,7 @@ public class CommentsIndentationCheck extends Check {
* @return true if the previous statement of a single line comment is distributed over two or
* more lines.
*/
private boolean isDistributedPreviousStatement(DetailAST singleLineComment) {
private static boolean isDistributedPreviousStatement(DetailAST singleLineComment) {
final DetailAST previousSibling = singleLineComment.getPreviousSibling();
return isDistributedMethodChainOrConcatenationStatement(singleLineComment, previousSibling)
|| isDistributedReturnStatement(previousSibling)
@ -323,7 +323,7 @@ public class CommentsIndentationCheck extends Check {
* @param nextStmt next statement.
* @return true if a single line comment is placed at the end of the block.
*/
private boolean isSingleLineCommentAtTheEndOfTheCodeBlock(DetailAST nextStmt) {
private static boolean isSingleLineCommentAtTheEndOfTheCodeBlock(DetailAST nextStmt) {
return nextStmt != null
&& nextStmt.getType() == TokenTypes.RCURLY;
}
@ -343,7 +343,7 @@ public class CommentsIndentationCheck extends Check {
* @param nextStmt next statement.
* @return true if comment is placed in the empty code block.
*/
private boolean isInEmptyCodeBlock(DetailAST prevStmt, DetailAST nextStmt) {
private static boolean isInEmptyCodeBlock(DetailAST prevStmt, DetailAST nextStmt) {
return prevStmt != null
&& nextStmt != null
&& (prevStmt.getType() == TokenTypes.SLIST