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:
parent
e1a2e66b26
commit
e89837b42e
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue