You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2010/08/16 10:21:12 UTC
svn commit: r985825 -
/karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java
Author: gnodet
Date: Mon Aug 16 08:21:11 2010
New Revision: 985825
URL: http://svn.apache.org/viewvc?rev=985825&view=rev
Log:
KARAF-138: WarDeploymentListener: checks for manifest osgi entries but fails if no manifest is found
Patch provided by Achim Nierbeck
Modified:
karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java
Modified: karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java
URL: http://svn.apache.org/viewvc/karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java?rev=985825&r1=985824&r2=985825&view=diff
==============================================================================
--- karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java (original)
+++ karaf/trunk/deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java Mon Aug 16 08:21:11 2010
@@ -61,7 +61,7 @@ public class WarDeploymentListener imple
}
// Only handle non OSGi bundles
Manifest m = jar.getManifest();
- if (m.getMainAttributes().getValue(
+ if (m!= null && m.getMainAttributes().getValue(
new Attributes.Name("Bundle-SymbolicName")) != null
&& m.getMainAttributes().getValue(
new Attributes.Name("Bundle-Version")) != null) {
@@ -128,7 +128,7 @@ public class WarDeploymentListener imple
}
// alter the original URL artifact
} catch (Exception e) {
- LOGGER.warn("Unable to create Weapp-Context from web.xml", e);
+ LOGGER.warn("Unable to create Webapp-Context from web.xml", e);
}
return new URL("war", null, protocol + ":" + path + "?Webapp-Context="
+ displayName);