aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2023-08-07 18:33:24 +0000
committerPJ Fanning <fanningpj@apache.org>2023-08-07 18:33:24 +0000
commit3b9a7c42c1ea24f3caa7eb2dc733aad07583ea6b (patch)
treeb3465d253aaa82e1617b2891d79e366139748ef4 /poi-integration
parent8e40aabb187903a8d8cf60d6bbff23d3023751a6 (diff)
downloadpoi-3b9a7c42c1ea24f3caa7eb2dc733aad07583ea6b.tar.gz
poi-3b9a7c42c1ea24f3caa7eb2dc733aad07583ea6b.zip
use of junit internal StringUtils is causing build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
index 5171158965..4d21916baa 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
@@ -42,7 +42,6 @@ import org.junit.jupiter.api.parallel.ExecutionMode;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.junit.platform.commons.util.StringUtils;
import org.opentest4j.AssertionFailedError;
/**
@@ -262,7 +261,7 @@ public class TestAllFiles {
}
} else {
// verify that message is either null for both or set for both
- assertTrue(actMsg != null || StringUtils.isBlank(exMessage),
+ assertTrue(actMsg != null || isBlank(exMessage),
errPrefix + " for " + exClass + " expected message '" + exMessage + "' but had '" + actMsg + "'");
if (actMsg != null) {
@@ -275,6 +274,16 @@ public class TestAllFiles {
}
}
+ private static boolean isBlank(final String str) {
+ final int strLen = str.length();
+ for (int i = 0; i < strLen; i++) {
+ if (!Character.isWhitespace(str.charAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
private static String pathReplace(String msg) {
if (msg == null) return null;