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 pt...@apache.org on 2008/03/06 22:29:32 UTC

svn commit: r634422 - /jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java

Author: ptahchiev
Date: Thu Mar  6 13:29:31 2008
New Revision: 634422

URL: http://svn.apache.org/viewvc?rev=634422&view=rev
Log:
check if the server property has a null key or value added.

Modified:
    jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java

Modified: jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java
URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java?rev=634422&r1=634421&r2=634422&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java (original)
+++ jakarta/cactus/trunk/integration/ant/src/main/java/org/apache/cactus/integration/ant/CactusTask.java Thu Mar  6 13:29:31 2008
@@ -34,8 +34,8 @@
 import org.apache.cactus.integration.ant.deployment.DeployableFile;
 import org.apache.cactus.integration.ant.deployment.EarParser;
 import org.apache.cactus.integration.ant.deployment.WarParser;
-
 import org.apache.cactus.integration.ant.util.PropertySet;
+
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.optional.junit.JUnitTask;
@@ -263,6 +263,9 @@
     public void addSysproperty(Environment.Variable theProperty)
     {
         addCactusServerProperty(theProperty);
+        if(theProperty.getKey() != null && !theProperty.getKey().trim().equals("") &&
+        		theProperty.getValue() != null && !theProperty.getValue().trim().equals(""))	
+        	addCactusClientProperty(theProperty.getKey(), theProperty.getValue());
         super.addSysproperty(theProperty);
     }
 
@@ -346,6 +349,13 @@
      */
     private void addCactusServerProperty(Variable theProperty)
     {
+    	//TODO We always need to check this below, because null properties
+    	// break the cargo execution
+        if(theProperty.getKey() == null || theProperty.getKey().trim().equals("")||
+        		theProperty.getValue() == null || theProperty.getValue().trim().equals("")) {
+        	return;
+        }
+    	
         log("Adding Cactus server system property [" 
             + theProperty.getKey() + "] with value [" 
             + theProperty.getValue() + "]", Project.MSG_VERBOSE);



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org