You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/09/08 20:56:51 UTC
cvs commit: jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container EarDeployableFile.java
vmassol 2003/09/08 11:56:51
Modified: integration/ant/src/java/org/apache/cactus/integration/ant/container
EarDeployableFile.java
Log:
check if context path found is not null. If so raise an error. That will prevent getting NPEs...
Revision Changes Path
1.2 +8 -2 jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/EarDeployableFile.java
Index: EarDeployableFile.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/EarDeployableFile.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EarDeployableFile.java 7 Sep 2003 19:54:37 -0000 1.1
+++ EarDeployableFile.java 8 Sep 2003 18:56:51 -0000 1.2
@@ -125,8 +125,14 @@
throw new BuildException("Could not find the WAR [" + webUri
+ "] in the EAR");
}
- this.contextPath = this.earArchive.getApplicationXml()
+ String context = this.earArchive.getApplicationXml()
.getWebModuleContextRoot(webUri);
+ if (context == null)
+ {
+ throw new BuildException("Could not find the Cactus context "
+ + "path in the EAR");
+ }
+ this.contextPath = context;
}
/**