Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/617#discussion_r30590279
--- Diff:
utils/common/src/main/java/brooklyn/util/javalang/AggregateClassLoader.java ---
@@ -69,8 +70,25 @@ public void add(int index, ClassLoader classLoader) {
if (classLoader != null) classLoaders.add(index, classLoader);
}
- /** Returns the _live_ (and modifiable) list of classloaders
- * @return */
+ /** Resets the classloader shown here to be the given set */
+ public void reset(Collection<? extends ClassLoader> newClassLoaders) {
+ synchronized (classLoaders) {
--- End diff --
What is the point of the synchronized? Is it just to guard against multiple
concurrent calls to `reset()`? None of the other modifications or accesses to
`classLoaders` is synchronized.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---