aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-08-05 15:58:43 +0000
committerNick Burch <nick@apache.org>2015-08-05 15:58:43 +0000
commit735760f21e91a0e40efe7bff30477099b7d31de0 (patch)
tree4fc61560a81e45e88ed845f0f3c01f9cbe48b28d /src/testcases/org/apache
parentc90272d65ecb7167f9ed0dd271a9ce6f26692293 (diff)
downloadpoi-735760f21e91a0e40efe7bff30477099b7d31de0.tar.gz
poi-735760f21e91a0e40efe7bff30477099b7d31de0.zip
NPE fix for text extraction from MSG files with only a short name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1694255 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache')
-rw-r--r--src/testcases/org/apache/poi/POITestCase.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/POITestCase.java b/src/testcases/org/apache/poi/POITestCase.java
index e38e46d4fe..3d0cea51dc 100644
--- a/src/testcases/org/apache/poi/POITestCase.java
+++ b/src/testcases/org/apache/poi/POITestCase.java
@@ -33,6 +33,12 @@ public class POITestCase extends TestCase {
haystack.contains(needle)
);
}
+ public static void assertNotContained(String haystack, String needle) {
+ assertFalse(
+ "Unexpectedly found text '" + needle + "' in text:\n" + haystack,
+ haystack.contains(needle)
+ );
+ }
public static <T> void assertEquals(T[] expected, T[] actual)
{