-
Notifications
You must be signed in to change notification settings - Fork 159
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
refactor: Separated JDK management code into its own module #1874
base: main
Are you sure you want to change the base?
Conversation
afc114d
to
f57b1c6
Compare
private static JdkManager jdkManager = null; | ||
|
||
@Nonnull | ||
public static JdkManager jdkManager() { |
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.
we seem to call this in many places - but how is going to take into affect jbang provided config of i.e. providers?
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.
Right now the idea is that the config gets used exactly in that file you're referencing. So the builder will use the config to initialize the jdk manager, including the providers. The jdk manager itself is then completely agnostic where its configuration comes from.
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.
ok so in jbang cli we would not call jdkmanger() but have our own instance configured from jbang config?
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.
Well, this JavaUtil
class is in the jbang CLI, so this code here is exactly where that instance using jbang config is created.
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.
NB: If you look a bit lower in the createProvider()
method you see it references config
, which is the jbang config. The missing part I mentioned in our chat is exactly that: tying together the config with the instance creation :-)
f57b1c6
to
8c7ba7e
Compare
8c7ba7e
to
4489268
Compare
Fixes #1857