Allow @Final on target class methods as well.

This commit is contained in:
Mumfrey committed 2016-02-04 00:43:41 +00:00
1 parent 3fe20b5e6e
commit 5bdb10884d
1 file changed
+4
@@ -375,6 +375,10 @@ public class MixinApplicator {
protected boolean isAlreadyMerged(MixinTargetContext mixin, MethodNode method, boolean isOverwrite, MethodNode target) {
AnnotationNode merged = ASMHelper.getVisibleAnnotation(target, MixinMerged.class);
if (merged == null) {
if (ASMHelper.getVisibleAnnotation(target, Final.class) != null) {
this.logger.warn("Overwrite prohibited for @Final method {} in {}. Skipping method.", method.name, mixin);
return true;
}
return false;
}