-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Allow to build Pulsar with JDK11 and -Dmaven.compiler.release=8 #9580
Conversation
@SuppressWarnings("restriction") | ||
private static sun.management.HotspotRuntimeMBean runtime; | ||
private static Object /*sun.management.HotspotRuntimeMBean*/ runtime; | ||
private static Method getTotalSafepointTimeHandle; |
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.
nit: naming this getTotalSafepointTimeMethod
instead of *Handle
? Since there's also java.lang.invoke.MethodHandle which is different than java.lang.reflect.Method
.
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.
I tried with method hanldes but I was not able to access the method.
So I did fall back to old reflection style
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.
LGTM
@eolivelli please follow up with an mr to update github workflows to use jdk11. |
@aahmed-se I wanted to do it, but in order to do it we have to work on the pulsar build images. Please commit this first simple step |
/pulsarbot rerun-failure-tests |
Master Issue: #9578
Motivation
If you try to build Pulsar on JDK11 and add the --release flag to javac (that is -Dmaven.compiler.release=8 in Maven terms) you see errors due to some internal APIs that have been hidden to the user at build time.
Modifications