felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1139278 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Date Fri, 24 Jun 2011 12:45:17 GMT
Author: mcculls
Date: Fri Jun 24 12:45:17 2011
New Revision: 1139278

URL: http://svn.apache.org/viewvc?rev=1139278&view=rev
Log:
FELIX-2722: avoid NPE when project.organization.name is null

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=1139278&r1=1139277&r2=1139278&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Fri Jun 24 12:45:17 2011
@@ -937,10 +937,13 @@ public class BundlePlugin extends Abstra
 
         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();



Mime
View raw message