Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-12-30 10:31:36 -0500
committerPascal Rapicault2016-01-28 13:10:24 -0500
commitb44ba7bf8164efad35b7119cd963cd557d50d1cc (patch)
tree8ac85ad0e9c08c2a52bbec8d1b4ec0645ad76eb3
parentd83a5dc622ffa4b2d0c2668bc1fc679e41906f5b (diff)
downloadrt.equinox.p2-b44ba7bf8164efad35b7119cd963cd557d50d1cc.tar.gz
rt.equinox.p2-b44ba7bf8164efad35b7119cd963cd557d50d1cc.tar.xz
rt.equinox.p2-b44ba7bf8164efad35b7119cd963cd557d50d1cc.zip
Bug 485018 - NullPointerException in SiteListener.getFeatures() I20160128-2000
Change-Id: Idc8c26f8012d22a4e7925f02941ff3f33eeeb947 Signed-off-by: Eike Stepper <stepper@esc-net.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
index 3aac05499..7203f1c46 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
@@ -296,7 +296,7 @@ public class SiteListener extends DirectoryChangeListener {
Map<File, Feature> result = new HashMap<File, Feature>();
File featureDir = new File(location, FEATURES);
File[] children = featureDir.listFiles();
- for (int i = 0; i < children.length; i++) {
+ for (int i = 0; children != null && i < children.length; i++) {
File featureLocation = children[i];
if (featureLocation.isDirectory() && featureLocation.getParentFile() != null && featureLocation.getParentFile().getName().equals("features") && new File(featureLocation, "feature.xml").exists()) {//$NON-NLS-1$ //$NON-NLS-2$
FeatureParser parser = new FeatureParser();

Back to the top