RFR: 8348986: Improve coverage of enhanced exception messages [v11]

Michael McMahon michaelm at openjdk.org
Thu May 29 09:02:55 UTC 2025


On Mon, 26 May 2025 20:39:51 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:

> You could take a slightly more radical approach, and rather than applying a filter explicitly on the exception message, adopt a builder pattern for the creation of the filter exceptions, for example
> 
> FilteredExceptionBuilder / EnhancedExceptionBuilder.
> 
> It might provide be more flexible and provide, encapsulating the filtering and policy application inside the builder.
> 
> EnhancedExceptionBuilder::class() ::exceptionMessage() ::port() ::hostname() ::userDetails() ::filterPolicy()

We've been through so many iterations at this stage, that I think what we've landed on is reasonable and probably most importantly, concise such that it's not overly intrusive at the call sites.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23929#issuecomment-2918770154


More information about the net-dev mailing list