-
Notifications
You must be signed in to change notification settings - Fork 144
8373202: [lworld] ObjectReference.equals should follow == semantics for value objects #1834
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
Changes from all commits
1d883c2
207aca4
88ac48b
ff1803d
32ea988
a5edf06
c46ea6a
576fc6a
549e6a7
96b3321
d58eae4
e0b4df7
f82f5be
e74a4cf
34c9c2b
55ba146
583f9e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -835,6 +835,10 @@ boolean mayCreateVirtualThreads() { | |
| return versionInfo().jdwpMajor >= 19; | ||
| } | ||
|
|
||
| public boolean supportsValueClasses() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if not running in preview mode? Value classes are not supported in that case, but as implemented this API will say they are supported, leading to isValueClass() looking at modifiers in a way that is not compatible when value classes are not supported. JDI didn't really run into this type of problem with virtual thread support. It did modify a couple of new public APIs with: However, I don't see how that helps us here. It seems we need to query the debug agent to find out if value classes are supported. There's no good way to do that. Is there any way for JDI to somewhat detect that value class support is supported (preview mode is enabled).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It should work correctly. The IDENTITY modifier bit is not used for other purposes in JDK 27 (Alex, please, fix me if it is wrong). So, the check for version >= 27 is needed. If preview is not enabled in target VM, so it does not support value classes then the IDENTITY modifier bit will be always set which results in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So in JDK 27, with or without enable preview, the IDENTITY modifier bit is accurate and can be looked at, but in previous JDK versions it might be used for something else?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Correct |
||
| return versionInfo().jdwpMajor >= 27; | ||
| } | ||
|
|
||
alexmenkov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public void setDebugTraceMode(int traceFlags) { | ||
| validateVM(); | ||
| this.traceFlags = traceFlags; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.