Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-15 12:07:58 +0000
committerAlexander Kurtakov2019-10-15 12:07:58 +0000
commitc62cfc44a2074e798d24660e4e1af7f0214854c4 (patch)
treebba1fb9e1af465df2ea243b5de62a5b19c30f26c /bundles/org.eclipse.equinox.p2.garbagecollector
parentc9a044f10e7d7189d2322068ee345c7db555b146 (diff)
downloadrt.equinox.p2-c62cfc44a2074e798d24660e4e1af7f0214854c4.tar.gz
rt.equinox.p2-c62cfc44a2074e798d24660e4e1af7f0214854c4.tar.xz
rt.equinox.p2-c62cfc44a2074e798d24660e4e1af7f0214854c4.zip
Fix warnings in official build.
Change-Id: If186493044b9fc3dcbecbd6673d4b32b08486a9e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.garbagecollector')
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java20
1 files changed, 5 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
index 2a169d3d2..0487aae50 100644
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -193,15 +193,10 @@ public class GarbageCollector implements SynchronousProvisioningListener, IAgent
//First we collect all repos and keys for the profile being GC'ed
for (IConfigurationElement configElt : configElts) {
- if (!(configElt.getName().equals("run"))) {
- //$NON-NLS-1$
+ if (configElt == null || !(configElt.getName().equals("run"))) { //$NON-NLS-1$
continue;
}
- IConfigurationElement runAttribute = configElt;
- if (runAttribute == null) {
- continue;
- }
- contributeMarkSets(runAttribute, profile, true);
+ contributeMarkSets(configElt, profile, true);
}
return true;
}
@@ -210,12 +205,7 @@ public class GarbageCollector implements SynchronousProvisioningListener, IAgent
IExtensionRegistry registry = RegistryFactory.getRegistry();
IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
for (IConfigurationElement configElt : configElts) {
- if (!(configElt.getName().equals("run"))) {
- //$NON-NLS-1$
- continue;
- }
- IConfigurationElement runAttribute = configElt;
- if (runAttribute == null) {
+ if (configElt == null || !(configElt.getName().equals("run"))) { //$NON-NLS-1$
continue;
}
IProfileRegistry profileRegistry = agent.getService(IProfileRegistry.class);
@@ -223,7 +213,7 @@ public class GarbageCollector implements SynchronousProvisioningListener, IAgent
return;
IProfile[] registeredProfiles = profileRegistry.getProfiles();
for (IProfile registeredProfile : registeredProfiles) {
- contributeMarkSets(runAttribute, registeredProfile, false);
+ contributeMarkSets(configElt, registeredProfile, false);
}
}
}

Back to the top