Skip to content

Commit 3d2a723

Browse files
committed
Improve ql code quality
1 parent 6512ed9 commit 3d2a723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/Language Abuse/EmptyMethod.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class LikelyJunitTest extends Method {
4747
(
4848
this.getName().matches("JUnit%") or
4949
this.getName().matches("test%") or
50-
this.getAnAnnotation().toString().matches("%Test")
50+
this.getAnAnnotation().getType().getName().matches("%Test")
5151
)
5252
}
5353
}
@@ -83,7 +83,7 @@ where
8383
//permit comment lines explaining why this is empty
8484
m.getNumberOfCommentLines() = 0 and
8585
//permit a javadoc above as well as sufficient reason to leave empty
86-
not exists(Javadoc jd | m.getDoc().getJavadoc() = jd) and
86+
not exists(m.getDoc().getJavadoc()) and
8787
//annotated methods are considered compliant
8888
not exists(m.getAnAnnotation()) and
8989
//default methods are not abstract, but are considered compliant

0 commit comments

Comments
 (0)