felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1680303 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
Date Tue, 19 May 2015 14:26:22 GMT
Author: davidb
Date: Tue May 19 14:26:22 2015
New Revision: 1680303

URL: http://svn.apache.org/r1680303
Log:
FELIX-4892 NPE in maven-bundle-plugin

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

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java?rev=1680303&r1=1680302&r2=1680303&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
Tue May 19 14:26:22 2015
@@ -28,6 +28,17 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import aQute.bnd.differ.Baseline;
+import aQute.bnd.differ.Baseline.Info;
+import aQute.bnd.differ.DiffPluginImpl;
+import aQute.bnd.osgi.Instructions;
+import aQute.bnd.osgi.Jar;
+import aQute.bnd.osgi.Processor;
+import aQute.bnd.service.diff.Delta;
+import aQute.bnd.service.diff.Diff;
+import aQute.bnd.version.Version;
+import aQute.service.reporter.Reporter;
+
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
@@ -48,17 +59,6 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.StringUtils;
 
-import aQute.bnd.differ.Baseline;
-import aQute.bnd.differ.Baseline.Info;
-import aQute.bnd.differ.DiffPluginImpl;
-import aQute.bnd.osgi.Instructions;
-import aQute.bnd.osgi.Jar;
-import aQute.bnd.osgi.Processor;
-import aQute.bnd.service.diff.Delta;
-import aQute.bnd.service.diff.Diff;
-import aQute.bnd.version.Version;
-import aQute.service.reporter.Reporter;
-
 /**
  * Abstract BND Baseline check between two bundles.
  */
@@ -161,7 +161,17 @@ abstract class AbstractBaselinePlugin
         }
 
         final Artifact previousArtifact = getPreviousArtifact();
-        final Jar previousBundle = openJar(previousArtifact.getFile());
+
+        final Jar previousBundle;
+        if (previousArtifact != null)
+        {
+            previousBundle = openJar(previousArtifact.getFile());
+        }
+        else
+        {
+            previousBundle = null;
+        }
+
         if ( previousBundle == null )
         {
             getLog().info( "Not generating Baseline report as there is no previous version
of the library to compare against" );



Mime
View raw message