aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1601414 - /aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java
Date Mon, 09 Jun 2014 15:49:09 GMT
Author: dkulp
Date: Mon Jun  9 15:49:08 2014
New Revision: 1601414

URL: http://svn.apache.org/r1601414
Log:
Fix a potential NPE

Modified:
    aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java

Modified: aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java?rev=1601414&r1=1601413&r2=1601414&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java
(original)
+++ aries/trunk/versioning/versioning-plugin/src/main/java/org/apache/aries/versioning/mojo/VersionCheckerMojo.java
Mon Jun  9 15:49:08 2014
@@ -99,6 +99,11 @@ public class VersionCheckerMojo extends 
         if (oldArtifact != null) {
             try {
                 BundleInfo newBundle = getBundleInfo(newFile);
+                if (newBundle == null || newBundle.getBundleManifest() == null) {
+                    //not a bundle type, just return
+                    getLog().info(newFile + " is not an OSGi bundle, skipping.");
+                    return;
+                }
                 if (null == newBundle.getBundleManifest().getManifestVersion()
                     && null == newBundle.getBundleManifest().getSymbolicName()
                     && Version.emptyVersion.equals(newBundle.getBundleManifest().getVersion()))
{



Mime
View raw message