Issue #1555: Mark methods as static

Fixes `MethodMayBeStatic` inspection violation.

Description:
>Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
This commit is contained in:
Michal Kordas 2015-08-30 10:53:55 +02:00 committed by Roman Ivanov
parent e1a2e66b26
commit e89837b42e
1 changed files with 2 additions and 2 deletions

View File

@ -266,7 +266,7 @@ public final class DetailAST extends CommonASTWithHiddenTokens {
* @param ast DetailAST node.
* @return Column number if non-comment node exists, -1 otherwise.
*/
private int findColumnNo(DetailAST ast) {
private static int findColumnNo(DetailAST ast) {
int resultNo = -1;
DetailAST node = ast;
while (node != null) {
@ -288,7 +288,7 @@ public final class DetailAST extends CommonASTWithHiddenTokens {
* @param ast DetailAST node.
* @return Line number if non-comment node exists, -1 otherwise.
*/
private int findLineNo(DetailAST ast) {
private static int findLineNo(DetailAST ast) {
int resultNo = -1;
DetailAST node = ast;
while (node != null) {