-
Notifications
You must be signed in to change notification settings - Fork 79
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
Handle missing default VMInstall when querying JVM system-packages #722
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.
Please change to not return null in querySystemPackages() and we probably should trigger one extra build containing this patch for RC1.
build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java
Outdated
Show resolved
Hide resolved
Test Results 246 files + 6 246 suites +6 57m 4s ⏱️ + 8m 23s For more details on these errors, see this check. Results for commit 70cb73f. ± Comparison against base commit ac4df5b. This pull request removes 1 test.
|
@akurtakov, @HannesWell : tests are green, I would propose to merge and re-trigger IBuild for RC1. |
Agree on merging. But isn't a I-Build triggered any way in about two hours? |
Looking at the calender there is indeed no more I-build planned for RC1. So I agree on both. :) |
Please merge and trigger I-build. |
Thanks. And thank you Andrey and Gireesh for your reviews! |
if (targetVM == null) { | ||
LOGGER.warn("No default JRE installation selected"); //$NON-NLS-1$ | ||
return List.of(); | ||
} | ||
Collection<String> targetVMSystemPackages = querySystemPackages(targetVM, null); |
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 would rather let querySystemPackages return a stream instead instead it is even converted to a stream right after that... and having null
as return value for collections is really ugly....
Fixes #721
This handles the case that
JavaRuntime.getDefaultVMInstall()
returns null, which according to the docs happenswhen no defaultVM was set or when the default VM has been disposed.
I also considered to just select any of the available VMs, maybe the 'latest' one, but since no default JRE should actually not happen (at least I get an error in the preferences if I don't select one), for me it seems to be better to warn the user about that instead of selecting just any VM.
@akurtakov should we merge this now to have this in RC1 or better wait for RC2?