maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r513451 - /maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
Date Thu, 01 Mar 2007 19:22:29 GMT
Author: carlos
Date: Thu Mar  1 11:22:28 2007
New Revision: 513451

URL: http://svn.apache.org/viewvc?view=rev&rev=513451
Log:
Fix null pointers

Modified:
    maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java

Modified: maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java?view=diff&rev=513451&r1=513450&r2=513451
==============================================================================
--- maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
(original)
+++ maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
Thu Mar  1 11:22:28 2007
@@ -21,6 +21,7 @@
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 import java.util.jar.Manifest;
@@ -88,7 +89,7 @@
     protected Analyzer getAnalyzer( MavenProject project, Jar[] classpath )
         throws IOException
     {
-        return getAnalyzer( project, null, null, classpath );
+        return getAnalyzer( project, new HashMap(), new Properties(), classpath );
     }
 
     protected Analyzer getAnalyzer( MavenProject project, Map instructions, Properties properties,
Jar[] classpath )
@@ -104,13 +105,6 @@
             props.put( Analyzer.IMPORT_PACKAGE, "*" );
         }
 
-        if ( !instructions.containsKey( Analyzer.PRIVATE_PACKAGE )
-            && !instructions.containsKey( Analyzer.EXPORT_PACKAGE ) )
-        {
-            String export = analyzer.calculateExportsFromContents( analyzer.getJar() );
-            analyzer.setProperty( Analyzer.EXPORT_PACKAGE, export );
-        }
-
         props.putAll( instructions );
 
         analyzer.setProperties( props );
@@ -119,6 +113,13 @@
 
         if ( classpath != null )
             analyzer.setClasspath( classpath );
+
+        if ( !instructions.containsKey( Analyzer.PRIVATE_PACKAGE )
+            && !instructions.containsKey( Analyzer.EXPORT_PACKAGE ) )
+        {
+            String export = analyzer.calculateExportsFromContents( analyzer.getJar() );
+            analyzer.setProperty( Analyzer.EXPORT_PACKAGE, export );
+        }
 
         analyzer.mergeManifest( analyzer.getJar().getManifest() );
 



Mime
View raw message