Author: fanningpj
Date: Mon Aug 7 18:33:24 2023
New Revision: 1911518
URL: http://svn.apache.org/viewvc?rev=1911518&view=rev
Log:
use of junit internal StringUtils is causing build issues
Modified:
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
Modified:
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java?rev=1911518&r1=1911517&r2=1911518&view=diff
==============================================================================
---
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
(original)
+++
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
Mon Aug 7 18:33:24 2023
@@ -42,7 +42,6 @@ import org.junit.jupiter.api.parallel.Ex
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;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]