-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rewrite generated calls to Objects.requireNonNull() #75
Comments
Cool. Thanks about telling what JDK 9 does. I haven't yet tried using it. I'll try to get some time to update Retrolambda this month. |
cushon
added a commit
to cushon/retrolambda
that referenced
this issue
Mar 3, 2016
requireNonNull is only available in JDK 7 and above. Starting in JDK 9, javac uses requireNonNull for synthetic null-checks, see: http://bugs.openjdk.java.net/browse/JDK-8074306 Fixes luontola#75
This is included in Retrolambda 2.2.0 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
In JDK 8 and below, javac generates synthetic null-checks by calling
Object.getClass
. Starting in JDK 9,Objects.requireNonNull()
is used if it is available (see JDK-8074306).This prevents retrolambda users from compiling code with JDK9 and running it on JDK6 or below, since
java.util.Objects
was introduced in JDK7.When targeting JDK < 7, retrolambda should rewrite the generated calls to
requireNonNull
.The text was updated successfully, but these errors were encountered: