-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove unused classloader settings #7288
Remove unused classloader settings #7288
Conversation
863f1b4
to
2f29835
Compare
So if I'm reading this correctly, the functions have been inlined and the parameters have been removed, but there are no actual changes and no external API that would hook in here. |
@@ -108,10 +108,6 @@ object Reloader { | |||
|
|||
def urls(cp: Classpath): Array[URL] = cp.map(_.toURI.toURL).toArray | |||
|
|||
val createURLClassLoader: ClassLoaderCreator = (name, urls, parent) => new NamedURLClassLoader(name, urls, parent) | |||
|
|||
val createDelegatedResourcesClassLoader: ClassLoaderCreator = (name, urls, parent) => new DelegatedResourcesClassLoader(name, urls, parent) |
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.
inlined
@@ -108,10 +108,6 @@ object Reloader { | |||
|
|||
def urls(cp: Classpath): Array[URL] = cp.map(_.toURI.toURL).toArray | |||
|
|||
val createURLClassLoader: ClassLoaderCreator = (name, urls, parent) => new NamedURLClassLoader(name, urls, parent) |
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.
inlined
@@ -207,10 +202,10 @@ object Reloader { | |||
def get: ClassLoader = { reloader.getClassLoader.orNull } | |||
}) | |||
|
|||
lazy val applicationLoader = dependencyClassLoader("PlayDependencyClassLoader", urls(dependencyClasspath), delegatingLoader) | |||
lazy val applicationLoader = new NamedURLClassLoader("PlayDependencyClassLoader", urls(dependencyClasspath), delegatingLoader) |
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.
from function above
@@ -346,7 +340,7 @@ class Reloader( | |||
val version = classLoaderVersion.incrementAndGet | |||
val name = "ReloadableClassLoader(v" + version + ")" | |||
val urls = Reloader.urls(classpath) | |||
val loader = createClassLoader(name, urls, baseLoader) | |||
val loader = new DelegatedResourcesClassLoader(name, urls, baseLoader) |
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.
from function above
Correct. Just trying to simplify the interface to |
As far as I can tell these settings have never been used and just add extra complication. These are not present in the Lagom reloader, which is a little cleaner
I also reordered to parameters to
startDevMode
to match the ordering in Lagom, which I think was nicer, as it makes it easier for me to follow the logic across the twoAfter this is merged, I have just one or maybe two changes left to the reload functionality and we will then be able to use the same reloader for Play and Lagom. After the cleanup is done it may make sense to have this be a separate project with its own lifecycle