geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: rev 47224 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment
Date Sat, 25 Sep 2004 22:22:57 GMT
Author: jboynes
Date: Sat Sep 25 15:22:56 2004
New Revision: 47224

Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Log:
Avoid NullPointer when both module and plan are specified

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Sat Sep 25 15:22:56 2004
@@ -69,6 +69,13 @@
 
         XmlObject plan = null;
         JarFile moduleJarFile = null;
+        if (moduleFile != null) {
+            try {
+                moduleJarFile = JarUtil.createJarFile(moduleFile);
+            } catch (IOException e) {
+                throw new DeploymentException("Could not open module file: " + moduleFile.getAbsolutePath());
+            }
+        }
         if (deploymentPlan != null) {
             plan = getPlan(deploymentPlan);
             for (Iterator i = builders.iterator(); i.hasNext();) {
@@ -82,11 +89,6 @@
                 throw new DeploymentException("No deployer found for this plan type: " +
deploymentPlan);
             }
         } else if (moduleFile != null) {
-            try {
-                moduleJarFile = JarUtil.createJarFile(moduleFile);
-            } catch (IOException e) {
-                throw new DeploymentException("Could not open module file: " + moduleFile.getAbsolutePath());
-            }
             for (Iterator i = builders.iterator(); i.hasNext();) {
                 ConfigurationBuilder candidate = (ConfigurationBuilder) i.next();
                 plan = candidate.getDeploymentPlan(moduleJarFile);

Mime
View raw message