karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject karaf git commit: [KARAF-4086] Avoid NPE in ExportFeatureMetaDataMojo.getBundleSymbolicName
Date Thu, 29 Oct 2015 10:14:14 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 04cefb6ce -> a2630e694


[KARAF-4086] Avoid NPE in ExportFeatureMetaDataMojo.getBundleSymbolicName


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/a2630e69
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/a2630e69
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/a2630e69

Branch: refs/heads/master
Commit: a2630e694e8281f475d6ea01701e73334f456e89
Parents: 04cefb6
Author: Christian Schneider <chris@die-schneider.net>
Authored: Thu Oct 29 11:13:58 2015 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Thu Oct 29 11:13:58 2015 +0100

----------------------------------------------------------------------
 .../apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/a2630e69/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java
index 032a2f7..b18001f 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ExportFeatureMetaDataMojo.java
@@ -146,8 +146,10 @@ public class ExportFeatureMetaDataMojo extends AbstractFeatureMojo {
                 Manifest manifest = jis.getManifest();
                 if (manifest != null) {
                     attributes = manifest.getMainAttributes();
-                    manifests.put(bundle.getLocation(), attributes);
+                } else {
+                    attributes = new Attributes();
                 }
+                manifests.put(bundle.getLocation(), attributes);
             } catch (IOException e) {
                 throw new MojoExecutionException("Error reading bundle manifest from " +
bundle.getLocation(), e);
             }


Mime
View raw message