-
Notifications
You must be signed in to change notification settings - Fork 64
Use a single classloader for java 11 if environment variable is set #461
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
Conversation
classLoaderInstance = new URLClassLoader(urlsForClassLoader); | ||
loadDrivers(classLoaderInstance); |
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.
extract to function to reuse from above also
synchronized (lock) { | ||
if (classLoaderInstance == null) { | ||
URLClassLoader loader = createURLClassLoaderInstance(); | ||
loadDrivers(loader); |
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.
looks like loadDrivers
can be moved to createURLClassLoaderInstance
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.
just two minor simplifications
URLClassLoader classLoader = createURLClassLoaderInstance(); | ||
return classLoader; |
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.
URLClassLoader classLoader = createURLClassLoaderInstance(); | |
return classLoader; | |
return createURLClassLoaderInstance(); |
URLClassLoader loader = createURLClassLoaderInstance(); | ||
classLoaderInstance = loader; |
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.
URLClassLoader loader = createURLClassLoaderInstance(); | |
classLoaderInstance = loader; | |
classLoaderInstance = createURLClassLoaderInstance(); |
dbf959e
to
657667a
Compare
657667a
to
cd0f7d5
Compare
If the
FUNCTIONS_WORKER_JAVA_SINGLE_CLASSLOADER
environment variable is set to true then the following changes are made#412