Closed KR33PYK1NG closed 3 years ago
Those mods should be using @Mutable
, which removes the final modifier from the field.
Those mods should be using
@Mutable
, which removes the final modifier from the field.
True. However, the very same code works if compiled with JDK 8 (and can logically be expected to work with JDK 11 by mod authors) This introduces unexpected runtime errors just by upgrading to Java 11, which is not a good thing.
This is not true, the mod authors are wrong. Mods (that don't use @Mutable
where required) compiled for JDK8 work on JDK8, and break on JDK11 even when still compiled for JDK8. There is nothing Mixin can do to fix this, it's the mod authors that need to fix their mods by adding @Mutable
.
Fine, I'll use a workaround until problematic mods' authors add @Mutable
where needed.
Thanks for the response anyway.
When running code compiled with JDK 11 (in this case, a server software), IllegalAccessErrors related to final field modification can be encountered when mods modify fields which are declared as final (and they do that a lot) Also worth mentioning that when software is compiled with JDK 8, no such error is present. Log: https://mclo.gs/BED8KjM This issue also points out the same problem and possibly can be helpful: https://github.com/spockframework/spock/issues/1011