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:
parent
775f0fa861
commit
d1d953819a
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue