-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: allow Java 7 source and bytecode #4801
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this a separate PR.
@@ -74,7 +74,7 @@ void cancel(boolean permanent) { | |||
} | |||
} | |||
|
|||
private static final class FutureRunnable implements Runnable { | |||
private final class FutureRunnable implements Runnable { | |||
|
|||
private final Rescheduler rescheduler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this as well? Otherwise it could be pretty confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
089e454
to
f5456d5
Compare
The JDK will produce code that invokes Object.requireNonNull when instantiating an inner class using a instance variable. See https://bugs.openjdk.java.net/browse/JDK-8202137
f5456d5
to
c6de176
Compare
Rescheduler.this.serializingExecutor.execute(new ChannelFutureRunnable()); | ||
} | ||
|
||
private boolean isEnabled() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... Sorry, I missed that. A bit of a pain. Whatever.
(This PR is a follow-up for an issue identified in #4799 and should not be merged without that change)
javac can produce code that invokes Object.requireNonNull when instantiating
an inner class using a instance variable. See
https://bugs.openjdk.java.net/browse/JDK-8202137
@ejona86 From the linked bug, I don't see that there is an option here other than marking the inner class non-static. It's slightly unsettling that we apparently need animalsniffer to catch javac including code that isn't present on old Android devices; I haven't had time to check if the android build system would otherwise do something fancy here to avoid issues at runtime on older devices.
If this looks alright, do you want to cherry-pick this commit into #4799, or keep this as a stand-alone PR?