objectcomputing / check-ins

Other
7 stars 7 forks source link

PermissionSecurityRule can be simplified #2427

Closed timyates closed 1 month ago

timyates commented 1 month ago

We can simplify the PermissionSecurityRule by utilising instanceof template variables from Java 16, thefindAnnotation method which already returns an optional, and by using Streams with flatmap instead of nested foreach calls