diff options
author | Eike Stepper | 2015-12-30 15:31:36 +0000 |
---|---|---|
committer | Pascal Rapicault | 2016-01-28 18:47:20 +0000 |
commit | 555ebad33d80fb8336bcb074a7fa85cbed524d14 (patch) | |
tree | f7fdfb1f89cb155d1f339a97a8493744c80e7c7f | |
parent | d41f034d0d10c7749a8f8aa36f3d8213be6b225e (diff) | |
download | rt.equinox.p2-555ebad33d80fb8336bcb074a7fa85cbed524d14.tar.gz rt.equinox.p2-555ebad33d80fb8336bcb074a7fa85cbed524d14.tar.xz rt.equinox.p2-555ebad33d80fb8336bcb074a7fa85cbed524d14.zip |
Bug 485018 - NullPointerException in SiteListener.getFeatures() M20160128-1800
Change-Id: Idc8c26f8012d22a4e7925f02941ff3f33eeeb947
Signed-off-by: Eike Stepper <stepper@esc-net.de>
(cherry picked from commit b44ba7bf8164efad35b7119cd963cd557d50d1cc)
-rw-r--r-- | bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java | 2 |
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(); |