disable toPattern() assertions pre JDK 1.4

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@600610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Matthew Jason Benson 2007-12-03 17:24:47 +00:00
parent 20817861c9
commit dadd5e0130
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ protected void doAssertions(String expected, String pattern, Object[] args,
String toPattern) { String toPattern) {
MessageFormat f = createMessageFormat(pattern, locale); MessageFormat f = createMessageFormat(pattern, locale);
assertEquals(expected, f.format(args)); assertEquals(expected, f.format(args));
assertEquals(toPattern, f.toPattern()); if (SystemUtils.isJavaVersionAtLeast(140)) {
assertEquals(toPattern, f.toPattern());
}
} }
protected void doAssertions(Format format, Object[] args) { protected void doAssertions(Format format, Object[] args) {