Summary: | [9] -Xbootclasspath/a should still be supported | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> |
Component: | Debug | Assignee: | Stephan Herrmann <stephan.herrmann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | sarika.sinha |
Version: | 4.7.1a | Keywords: | regression |
Target Milestone: | 4.16 RC1 | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://git.eclipse.org/r/163496 https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=24c902dc95adaf885e41db96320cfc3c78af29d3 https://bugs.eclipse.org/bugs/show_bug.cgi?id=563602 |
||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 562556 |
Description
Stephan Herrmann
2020-05-24 16:03:10 EDT
New Gerrit change created: https://git.eclipse.org/r/163496 (In reply to Eclipse Genie from comment #1) > New Gerrit change created: https://git.eclipse.org/r/163496 Here's a simple fix: don't rely on IRuntimeClasspathEntry.STANDARD_CLASSES (because it no longer occurs in Java 9+), but directly ask JavaRuntime.isVMInstallReference(entry), which is used right here anyway. I would love to provide a unit test, but that would involve creating a byte code transformer that inserts references to a library classes into classes from arbitrary class loaders. That library, to be available *everywhere* must be added to the bootclasspath. I don't think JDT/Debug tests have the infrastructure for byte code transformation, do they? I'd love to see this fix in RC1, if people agree that the patch is safe. The bug breaks running OT/J applications on Java 9 (see bug 562556). Other tools using byte code transformations will likely face the same problem. OTOH, to be fair, I should mention that I can workaround this bug, using OT/J adaptation of JDT/Debug :) - so it's not a serious blocker. Sarika, do you have a minute to look at the patch and give +1 for RC1? (In reply to Stephan Herrmann from comment #3) > Sarika, do you have a minute to look at the patch and give +1 for RC1? +1 for RC1. For unit test case, do we really need byte code transformer? BootpathTests can be enhance to have a Java 9 non modular project to verify ? (In reply to Sarika Sinha from comment #4) > (In reply to Stephan Herrmann from comment #3) > > Sarika, do you have a minute to look at the patch and give +1 for RC1? > > +1 for RC1. thanks > For unit test case, do we really need byte code transformer? > BootpathTests can be enhance to have a Java 9 non modular project to verify ? That's exactly what I need, thanks. Will create a test case later today. Patch set #2 adds a test by making BootpathTests capable for running on Java 9+, and enabling it on all versions (in AutomatedSuite). New test added to this suite for append. Interestingly, without the fix all four contained tests fail on 9+. With the fix only one case test produces different results (empty array vs. null). Made this a conditional test expectation for now. Later we might also check, if testPrependBootpath() should actually raise some kind of error on 9+. Gerrit change https://git.eclipse.org/r/163496 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=24c902dc95adaf885e41db96320cfc3c78af29d3 (In reply to Stephan Herrmann from comment #6) > Patch set #2 adds a test by making BootpathTests capable for running on Java > 9+, and enabling it on all versions (in AutomatedSuite). New test added to > this suite for append. > > Interestingly, without the fix all four contained tests fail on 9+. With the > fix only one case test produces different results (empty array vs. null). > Made this a conditional test expectation for now. > > Later we might also check, if testPrependBootpath() should actually raise > some kind of error on 9+. Please open a bug to track this. Thanks, Sarika, for merging. I file bug 563602 for final polish in this area. |