You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or 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
This PR adds support for Java 9 String concatenation by rewriting its invokedynamic instructions to StringBuilder appends.
This makes it possible to compile your Java 9+ code with RoboVM. New language features like private/static/default interface methods [Java 9], local-variable type inference (the var keyword) [Java 10], switch expressions [Java 14] or text blocks [Java 15] will work now.
Caution when using Java 11+: Nested classes are handled differently from now on. Previously you have been able to access private methods/fields of nested classes in the outer class and vice versa, however this will now result in an IllegalAccessError.
@CoderBaron Thanks for this, should be extremely useful. Until now it was possible to use RoboVM for JAR files compiled with Java 9-11, but it requires the following Gradle option:
Obviously, this only works for your own code. Any libraries compiled with Java 9+ would become unusable, which should be fixed by this. Obviously, the libraries would still not work if they use new APIs, so in parallel to this I'm also eagerly following #527.
In JEP 181 they added support for accessing private nested members directly, dropping the need to create access bridge methods. Of course with a runtime below version 11, Java fails to find these methods.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Java 9 String concatenation by rewriting its
invokedynamic
instructions to StringBuilder appends.This makes it possible to compile your Java 9+ code with RoboVM. New language features like
private/static/default interface methods [Java 9]
,local-variable type inference (the var keyword) [Java 10]
,switch expressions [Java 14]
ortext blocks [Java 15]
will work now.Caution when using Java 11+: Nested classes are handled differently from now on. Previously you have been able to access private methods/fields of nested classes in the outer class and vice versa, however this will now result in an
IllegalAccessError
.