Skip to content

Improve backwards compatibility of ErrorAttributes and DefaultErrorAttributes #21324

@wilkinsona

Description

@wilkinsona

The changes for including the message or binding errors are perhaps more breaking than they need to be. I’ve been wondering if we should make the new method on ErrorAttributes a default method. I also wondered if we should encapsulate the three include… booleans into a type so that we can add more exclusions in the future without having to change that interface.

As an alternative to a new type that encapsulates the includes, @philwebb suggested a varargs enum. An implementation could then use EnumSet.copyOf(Arrays.asList(includes)).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions