summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2012-04-28 13:51:48 (EDT)
committerPascal Rapicault2012-04-28 13:51:48 (EDT)
commit76bef3927a83bb4885e9cc599184ca23dfd52289 (patch)
treeef9c734666df450a8c97d929e7c1f4b88574c3f6
parentf255e62712befcff29300b786c25fdd2bd9cc8fb (diff)
downloadrt.equinox.p2-76bef3927a83bb4885e9cc599184ca23dfd52289.zip
rt.equinox.p2-76bef3927a83bb4885e9cc599184ca23dfd52289.tar.gz
rt.equinox.p2-76bef3927a83bb4885e9cc599184ca23dfd52289.tar.bz2
Fix NPE occurring when no context metadata repo is providedv20120428-1751
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
index 3bb000f..9ee9acf 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
@@ -86,7 +86,8 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
*/
private void createLauncherAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
Collection<IInstallableUnit> ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
- ius.addAll(getIUs(publisherInfo.getContextMetadataRepository().query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet(), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER));
+ if (publisherInfo.getContextMetadataRepository() != null)
+ ius.addAll(getIUs(publisherInfo.getContextMetadataRepository().query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet(), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER));
VersionAdvice advice = new VersionAdvice();
boolean found = false;
for (IInstallableUnit iu : ius) {