File tree Expand file tree Collapse file tree
java-checks/src/main/java/org/sonar/java/checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020package org .sonar .java .checks ;
2121
2222import com .google .common .collect .Iterables ;
23+
2324import org .sonar .plugins .java .api .JavaCheck ;
2425import org .sonar .plugins .java .api .JavaFileScanner ;
2526import org .sonar .plugins .java .api .JavaFileScannerContext ;
@@ -78,7 +79,7 @@ public void visitClass(ClassTree tree) {
7879 }
7980
8081 @ CheckForNull
81- private SyntaxToken getLastTokenFromSignature (ClassTree classTree ) {
82+ private static SyntaxToken getLastTokenFromSignature (ClassTree classTree ) {
8283 List <TypeTree > superInterfaces = classTree .superInterfaces ();
8384 if (!superInterfaces .isEmpty ()) {
8485 return getIdentifierToken (Iterables .getLast (superInterfaces ));
@@ -199,7 +200,7 @@ public void visitMethod(MethodTree tree) {
199200 super .visitMethod (tree );
200201 }
201202
202- private SyntaxToken getLastTokenFromSignature (MethodTree methodTree ) {
203+ private static SyntaxToken getLastTokenFromSignature (MethodTree methodTree ) {
203204 if (methodTree .throwsClauses ().isEmpty ()) {
204205 return methodTree .closeParenToken ();
205206 } else {
Original file line number Diff line number Diff line change 2020package org .sonar .java .checks .naming ;
2121
2222import com .google .common .collect .Lists ;
23+
2324import org .sonar .api .server .rule .RulesDefinition ;
2425import org .sonar .check .Priority ;
2526import org .sonar .check .Rule ;
@@ -84,7 +85,7 @@ public void visitClass(ClassTree tree) {
8485 fields .clear ();
8586 }
8687
87- private boolean staticFieldSameType (Symbol classSymbol , Symbol sym ) {
88+ private static boolean staticFieldSameType (Symbol classSymbol , Symbol sym ) {
8889 return sym .type ().equals (classSymbol .type ()) && sym .isStatic ();
8990 }
9091
You can’t perform that action at this time.
0 commit comments