tidy up npe when system bundle does not have framework bundle set (FELIX-2143)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@917456 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/eclipse/search/src/org/apache/felix/sigil/search/SigilSearch.java b/sigil/eclipse/search/src/org/apache/felix/sigil/search/SigilSearch.java
index f19f81e..bf871ff 100644
--- a/sigil/eclipse/search/src/org/apache/felix/sigil/search/SigilSearch.java
+++ b/sigil/eclipse/search/src/org/apache/felix/sigil/search/SigilSearch.java
@@ -163,9 +163,14 @@
if ( bundle.isSynchronized() )
{
IPath loc = bundle.getLocation();
- if ( loc.isAbsolute() )
- {
- indexJar( rep, bundle, loc );
+ if ( loc == null ) {
+ SigilCore.error("Location is null for " + bundle);
+ }
+ else {
+ if ( loc.isAbsolute() )
+ {
+ indexJar( rep, bundle, loc );
+ }
}
}
}
@@ -193,8 +198,7 @@
}
catch ( JavaModelException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ SigilCore.error( "Failed to index project", e);
}
}