Created
December 27, 2012 13:14
-
-
Save neomatrix369/4388322 to your computer and use it in GitHub Desktop.
Changed logic behind how CanSubclassChecker checks for mutability in src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java b/src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java b/src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java | |
index 947cd5e..c8baaf2 100644 | |
--- a/src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java | |
+++ b/src/main/java/org/mutabilitydetector/checkers/CanSubclassChecker.java | |
@@ -39,7 +39,7 @@ public final class CanSubclassChecker extends AbstractMutabilityChecker { | |
@Override | |
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { | |
- if (MethodIs.aConstructor(name) && method(access).isNotPrivate()) { | |
+ if (MethodIs.aConstructor(name) && (method(access).isNotPrivate()) && method(access).isNotSynthetic()) { | |
hasOnlyPrivateConstructors = false; | |
} | |
return super.visitMethod(access, name, desc, signature, exceptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment