directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1075037 - /directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java
Date Sun, 27 Feb 2011 12:31:20 GMT
Author: akarasulu
Date: Sun Feb 27 12:31:20 2011
New Revision: 1075037

URL: http://svn.apache.org/viewvc?rev=1075037&view=rev
Log:
fixing potential null pointer exception: some jars do not seem to have manifests

Modified:
    directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java

Modified: directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java?rev=1075037&r1=1075036&r2=1075037&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java
(original)
+++ directory/shared/branches/akarasulu/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java
Sun Feb 27 12:31:20 2011
@@ -185,6 +185,11 @@ public class OsgiUtils
             jar = new JarFile( bundle );
             Manifest manifest = jar.getManifest();
             
+            if ( manifest == null )
+            {
+                return null;
+            }
+            
             Attributes attrs = manifest.getMainAttributes();
             for ( Object key : attrs.keySet() )
             {



Mime
View raw message