-
Notifications
You must be signed in to change notification settings - Fork 729
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
Throw NoClassDefFoundError: MH.resolveInvokeDynamic(...) #20
Conversation
f99a4a5
to
0ce9d83
Compare
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
0ce9d83
to
76de5dc
Compare
a724832
to
5961bb5
Compare
5961bb5
to
479e552
Compare
@AdamBrousseau the builds are failing without any errors. same issue noticed for #19. |
@babsingh Did you force push at some point? The builds get confused when the sha they expect isn't in the repo anymore |
@DanHeidinga yes. how to fix this issue? |
I've restarted the build on travis. Let's see if it passes now |
@DanHeidinga the build still failed. |
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.
Some doc updates required, otherwise looks good
* Retrieve the class name of the constant pool class element located at the specified | ||
* index in clazz's constant pool. Then, throw a NoClassDefFoundError with the cause | ||
* set as ClassNotFoundException. The message of NoClassDefFoundError and | ||
* ClassNotFoundException contains the name of the class, which couldn't be found. |
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.
Can you add javadoc style comment for the arguments / return types?
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.
fixed
@@ -459,6 +459,41 @@ Java_sun_reflect_ConstantPool_getFieldAtIfLoaded0(JNIEnv *env, jobject unusedObj | |||
} | |||
|
|||
jobject JNICALL | |||
Java_java_lang_invoke_MethodHandle_getClassNameAt(JNIEnv *env, jobject unusedObject, jobject constantPoolOop, jint cpIndex) |
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.
Please a function comment that describes the arguments, the return types and any invariants.
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.
fixed
* set as ClassNotFoundException. The message of NoClassDefFoundError and | ||
* ClassNotFoundException contains the name of the class, which couldn't be found. | ||
*/ | ||
private static Throwable noClassDefFoundError(Class<?> clazz, int index) { |
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.
Its totally a nitpick, but can you call this throwNoClassDefFoundError(...)
? so it will match the naming convention in the j.l.i. package for these kinds of methods
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.
fixed
a51643d
to
121b44d
Compare
* Get the class name from a constant pool class element, which is located at the | ||
* specified index in clazz's constant pool. | ||
*/ | ||
private static final native String getClassNameAt(Class<?> clazz, int index); |
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.
My apologies - I missed a naming convention issue. All the other MH-constantPool related methods have a CP
prefix - i.e.: getCPClassNameAt
see:
Java_java_lang_invoke_MethodHandle_getCPTypeAt
Java_java_lang_invoke_MethodHandle_getCPMethodTypeAt
Java_java_lang_invoke_MethodHandle_getCPMethodHandleAt
And Javadoc the method as well please.
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.
changed name to getCPClassNameAt
, added Java doc for getCPClassNameAt
, and resolved merge conflicts that arose from merging #19
121b44d
to
ee14d38
Compare
If ConstantPool.getClassAt(...) returns null while resolving bootstrap method handles, then we should throw NoClassDefFoundError, and the cause of NoClassDefFoundError should be ClassNotFoundException. The message of NoClassDefFoundError and ClassNotFoundException should contain the name of the class, which wasn't found. Signed-off-by: Babneet Singh <[email protected]>
ee14d38
to
a45bf26
Compare
Jenkins test sanity |
This is ready to merge once the sanity builds pass. |
@DanHeidinga Sanity Tests have failed due to the following error: |
jenkins test sanity |
this was a temporarily problem as a PR was merged before the required OMR content had promoted. |
Disable Windows OpenJ9 Java 8 builds temporarily
* Updated JVMImageHeader and fixed reading from file * Formatting fixup * Moved the header's buffer to the stack Signed-off-by: Brady Jessup <[email protected]>
…e-queries Move value type query methods to ClassEnv
If ConstantPool.getClassAt(...) returns null while resolving bootstrap
method handles, then we should throw NoClassDefFoundError, and the
cause of NoClassDefFoundError should be ClassNotFoundException. The
message of NoClassDefFoundError and ClassNotFoundException should
contain the name of the class, which wasn't found.
Signed-off-by: Babneet Singh [email protected]