minor: rearrange methods
@@ -69,15 +69,6 @@ public class Container {
});
}
- private void deconstructObsoleteComponents(ComponentGraph oldGraph,
- ComponentGraph newGraph,
- Collection<Bundle> obsoleteBundles) {
- IdentityHashMap<Object, Object> oldComponents = new IdentityHashMap<>();
- oldGraph.allConstructedComponentsAndProviders().forEach(c -> oldComponents.put(c, null));
- newGraph.allConstructedComponentsAndProviders().forEach(oldComponents::remove);
- componentDeconstructor.deconstruct(oldComponents.keySet(), obsoleteBundles);
- }
-
public ComponentGraph getNewComponentGraph(ComponentGraph oldGraph, Injector fallbackInjector, boolean restartOnRedeploy) {
try {
Collection<Bundle> obsoleteBundles = new HashSet<>();
@@ -101,6 +92,15 @@ public class Container {
return getNewComponentGraph(new ComponentGraph(), Guice.createInjector(), false);
}
+ private void deconstructObsoleteComponents(ComponentGraph oldGraph,
+ ComponentGraph newGraph,
+ Collection<Bundle> obsoleteBundles) {
+ IdentityHashMap<Object, Object> oldComponents = new IdentityHashMap<>();
+ oldGraph.allConstructedComponentsAndProviders().forEach(c -> oldComponents.put(c, null));
+ newGraph.allConstructedComponentsAndProviders().forEach(oldComponents::remove);
+ componentDeconstructor.deconstruct(oldComponents.keySet(), obsoleteBundles);
+ }
+
private static String newGraphErrorMessage(long generation, Throwable cause) {
String failedFirstMessage = "Failed to set up first component graph";
String failedNewMessage = "Failed to set up new component graph";
