We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6512ed9 commit 3d2a723Copy full SHA for 3d2a723
1 file changed
java/ql/src/Language Abuse/EmptyMethod.ql
@@ -47,7 +47,7 @@ class LikelyJunitTest extends Method {
47
(
48
this.getName().matches("JUnit%") or
49
this.getName().matches("test%") or
50
- this.getAnAnnotation().toString().matches("%Test")
+ this.getAnAnnotation().getType().getName().matches("%Test")
51
)
52
}
53
@@ -83,7 +83,7 @@ where
83
//permit comment lines explaining why this is empty
84
m.getNumberOfCommentLines() = 0 and
85
//permit a javadoc above as well as sufficient reason to leave empty
86
- not exists(Javadoc jd | m.getDoc().getJavadoc() = jd) and
+ not exists(m.getDoc().getJavadoc()) and
87
//annotated methods are considered compliant
88
not exists(m.getAnAnnotation()) and
89
//default methods are not abstract, but are considered compliant
0 commit comments