Skip to content

Commit b275152

Browse files
committed
Minor improvement to test comments/javadocs
1 parent d005f80 commit b275152

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/java/com/fasterxml/jackson/core/BaseTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,17 +498,22 @@ protected void assertType(Object ob, Class<?> expType)
498498
}
499499
}
500500

501-
protected void verifyException(Throwable e, String... matches)
501+
/**
502+
* @param e Exception to check
503+
* @param anyMatches Array of Strings of which AT LEAST ONE ("any") has to be included
504+
* in {@code e.getMessage()} -- using case-INSENSITIVE comparison
505+
*/
506+
protected void verifyException(Throwable e, String... anyMatches)
502507
{
503508
String msg = e.getMessage();
504509
String lmsg = (msg == null) ? "" : msg.toLowerCase();
505-
for (String match : matches) {
510+
for (String match : anyMatches) {
506511
String lmatch = match.toLowerCase();
507512
if (lmsg.indexOf(lmatch) >= 0) {
508513
return;
509514
}
510515
}
511-
fail("Expected an exception with one of substrings ("+Arrays.asList(matches)+"): got one with message \""+msg+"\"");
516+
fail("Expected an exception with one of substrings ("+Arrays.asList(anyMatches)+"): got one with message \""+msg+"\"");
512517
}
513518

514519
/**

0 commit comments

Comments
 (0)