mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
Fix minor review mentions
This commit is contained in:
@@ -69,24 +69,29 @@ public class DefaultPluginManager implements PluginManager {
|
||||
private final Collection<PendingPluginUninstallation> pendingUninstallQueue = new ArrayList<>();
|
||||
private final PluginDependencyTracker dependencyTracker = new PluginDependencyTracker();
|
||||
|
||||
private Function<List<AvailablePlugin>, PluginInstallationContext> contextFactory;
|
||||
private final Function<List<AvailablePlugin>, PluginInstallationContext> contextFactory;
|
||||
|
||||
@Inject
|
||||
public DefaultPluginManager(PluginLoader loader, PluginCenter center, PluginInstaller installer, Restarter restarter, ScmEventBus eventBus) {
|
||||
this(loader, center, installer, restarter, eventBus, null);
|
||||
}
|
||||
|
||||
DefaultPluginManager(PluginLoader loader, PluginCenter center, PluginInstaller installer, Restarter restarter, ScmEventBus eventBus, Function<List<AvailablePlugin>, PluginInstallationContext> contextFactory) {
|
||||
this.loader = loader;
|
||||
this.center = center;
|
||||
this.installer = installer;
|
||||
this.restarter = restarter;
|
||||
this.eventBus = eventBus;
|
||||
|
||||
if (contextFactory != null) {
|
||||
this.contextFactory = contextFactory;
|
||||
} else {
|
||||
this.contextFactory = (availablePlugins -> PluginInstallationContext.from(getInstalled(), availablePlugins));
|
||||
}
|
||||
|
||||
this.computeInstallationDependencies();
|
||||
this.contextFactory = (availablePlugins -> PluginInstallationContext.from(getInstalled(), availablePlugins));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void setContextFactory(Function<List<AvailablePlugin>, PluginInstallationContext> contextFactory) {
|
||||
this.contextFactory = contextFactory;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
synchronized void computeInstallationDependencies() {
|
||||
|
||||
Reference in New Issue
Block a user