Skip to content

Commit e4666c1

Browse files
mchesjhoeller
authored andcommitted
Support new exception message wording since Jackson 2.9
The wording changed from "Can not find" to "Cannot find" via PR #1682 Issues: SPR-16947
1 parent bea0e39 commit e4666c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected void logWarningIfNecessary(Type type, @Nullable Throwable cause) {
190190
}
191191

192192
boolean debugLevel = (cause instanceof JsonMappingException &&
193-
cause.getMessage().startsWith("Can not find"));
193+
(cause.getMessage().startsWith("Can not find") || cause.getMessage().startsWith("Cannot find")));
194194

195195
if (debugLevel ? logger.isDebugEnabled() : logger.isWarnEnabled()) {
196196
String msg = "Failed to evaluate Jackson " + (type instanceof JavaType ? "de" : "") +

0 commit comments

Comments
 (0)