Commit d1d95381 authored by lock14's avatar lock14 Committed by Phillip Webb

Allow other "timestamp" types in MVC error model

Remove casting "timestamp" to `java.util.Date` in
`ErrorMvcAutoConfiguration` as the cast is not necessary and it
prevents other types (e.g. `java.time`) from being used.

See gh-23256
parent 775f0fa8
...@@ -206,7 +206,7 @@ public class ErrorMvcAutoConfiguration { ...@@ -206,7 +206,7 @@ public class ErrorMvcAutoConfiguration {
} }
response.setContentType(TEXT_HTML_UTF8.toString()); response.setContentType(TEXT_HTML_UTF8.toString());
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
Date timestamp = (Date) model.get("timestamp"); Object timestamp = model.get("timestamp");
Object message = model.get("message"); Object message = model.get("message");
Object trace = model.get("trace"); Object trace = model.get("trace");
if (response.getContentType() == null) { if (response.getContentType() == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment