Expected Behavior Add functionality to use @PostFilter on Optional return types.

Current Behavior Currently filtering is supported for collections, arrays, maps and streams. To add support for optional filtering, you have to create a custom handler extending the DefaultMethodSecurityExpressionHandler, add an implementation for optionals filtering (through stream filtering) and then register this new handler. This is very cumbersome.

Comment From: jzheaux

This is related to an earlier discussion about @PostAuthorize.

In addition to Rob's recommendation (above) to use .orElse, @PostFilter is intended for filtering collections, so I'd be hesitant to support non-collection return types.