This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-exec.git
The following commit(s) were added to refs/heads/master by this push:
new 9288fcc Use isEmpty().
9288fcc is described below
commit 9288fcc7084bd492e550d130f566bfcfca9322cc
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jan 16 22:28:58 2021 -0500
Use isEmpty().
---
.../java/org/apache/commons/exec/environment/EnvironmentUtilsTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilsTest.java
b/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilsTest.java
index 2a59525..39c676c 100644
---
a/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilsTest.java
+++
b/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilsTest.java
@@ -19,6 +19,7 @@
package org.apache.commons.exec.environment;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -71,7 +72,7 @@ public class EnvironmentUtilsTest {
final Map<String, String> procEnvironment =
EnvironmentUtils.getProcEnvironment();
// we assume that there is at least one environment variable
// for this process, i.e. $JAVA_HOME
- assertTrue("Expecting non-zero environment size",
procEnvironment.size() > 0);
+ assertFalse("Expecting non-zero environment size",
procEnvironment.isEmpty());
final String[] envArgs = EnvironmentUtils.toStrings(procEnvironment);
for (int i=0; i<envArgs.length; i++) {
assertNotNull("Entry "+i+" should not be null",envArgs[i]);