FELIX-2722: avoid NPE when project.organization.name is null
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1139278 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 084d55c..7a43d2c 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -937,10 +937,13 @@
if ( currentProject.getOrganization() != null )
{
- String organizationName = currentProject.getOrganization().getName();
- header( properties, Analyzer.BUNDLE_VENDOR, organizationName );
- properties.put( "project.organization.name", organizationName );
- properties.put( "pom.organization.name", organizationName );
+ if ( currentProject.getOrganization().getName() != null )
+ {
+ String organizationName = currentProject.getOrganization().getName();
+ header( properties, Analyzer.BUNDLE_VENDOR, organizationName );
+ properties.put( "project.organization.name", organizationName );
+ properties.put( "pom.organization.name", organizationName );
+ }
if ( currentProject.getOrganization().getUrl() != null )
{
String organizationUrl = currentProject.getOrganization().getUrl();