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
This commit is contained in:
lock14 2020-09-11 13:24:06 -07:00 committed by Phillip Webb
parent 775f0fa861
commit d1d953819a
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ public class ErrorMvcAutoConfiguration {
}
response.setContentType(TEXT_HTML_UTF8.toString());
StringBuilder builder = new StringBuilder();
Date timestamp = (Date) model.get("timestamp");
Object timestamp = model.get("timestamp");
Object message = model.get("message");
Object trace = model.get("trace");
if (response.getContentType() == null) {