Skip to content

Commit a7cc8fc

Browse files
committed
Adjust code based on review
1 parent ec5ac17 commit a7cc8fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ private predicate candidateMethod(RefType t, Method m, string name, int numParam
5757
m.getNumberOfParameters() = numParam and
5858
m = m.getSourceDeclaration() and
5959
not m.getAnAnnotation() instanceof DeprecatedAnnotation and
60+
// Exclude compiler generated methods, such as Kotlin `$default` methods:
61+
not m.isCompilerGenerated() and
6062
not whitelist(name)
6163
}
6264

@@ -137,8 +139,6 @@ private predicate delegate(Method caller, Method callee) {
137139

138140
from Method m, Method n, string messageQualifier
139141
where
140-
// Exclude compiler generated methods, such as Kotlin `$default` methods:
141-
not m.isCompilerGenerated() and
142142
confusinglyOverloaded(m, n) and
143143
(
144144
if m.getDeclaringType() = n.getDeclaringType()

0 commit comments

Comments
 (0)