You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2010/10/02 17:35:40 UTC
svn commit: r1003818 -
/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
Author: niallp
Date: Sat Oct 2 15:35:40 2010
New Revision: 1003818
URL: http://svn.apache.org/viewvc?rev=1003818&view=rev
Log:
Restore JDK 1.3 compatibility - String.contains() requires JDK 1.5
Modified:
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java?rev=1003818&r1=1003817&r2=1003818&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java Sat Oct 2 15:35:40 2010
@@ -584,7 +584,7 @@ public class DefaultExecutorTest extends
exec.execute(new CommandLine(environmentSript));
String environment = baos.toString().trim();
assertTrue("Found no environment variables", environment.length() > 0);
- assertFalse(environment.contains("NEW_VAR"));
+ assertFalse(environment.indexOf("NEW_VAR") >= 0);
System.out.println(environment);
}
@@ -600,7 +600,7 @@ public class DefaultExecutorTest extends
myEnvVars.put("NEW_VAR","NEW_VAL");
exec.execute(new CommandLine(environmentSript), myEnvVars);
String environment = baos.toString().trim();
- assertTrue(environment.contains("NEW_VAR"));
+ assertTrue(environment.indexOf("NEW_VAR") >= 0);
}
// ======================================================================