Skip to content

Commit f14c90f

Browse files
committed
restore constructor exact check
1 parent 910851d commit f14c90f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/de/thetaphi/forbiddenapis/ClassScanner.java

+3
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ private String checkMethodAccess(String owner, final Method method, final boolea
393393
if (violation != null) {
394394
return violation;
395395
}
396+
if (CONSTRUCTOR_METHOD_NAME.equals(method.getName())) {
397+
return null; // don't look into superclasses or interfaces to find constructors!
398+
}
396399
final ClassMetadata c = lookup.lookupRelatedClass(owner, owner);
397400
if (c == null) {
398401
return null;

0 commit comments

Comments
 (0)