private SingleConstraintMatch mergeConstraints ( final RuntimeMatch currentMatch ) { if ( currentMatch . uncovered && denyUncoveredHttpMethods ) { return new SingleConstraintMatch ( SecurityInfo . EmptyRoleSemantic . DENY , Collections . < String > emptySet ( ) ) ; } final Set < String > allowedRoles = new HashSet <> ( ) ; for ( SingleConstraintMatch match : currentMatch . constraints ) { if ( match . getRequiredRoles ( ) . isEmpty ( ) ) { return new SingleConstraintMatch ( match . getEmptyRoleSemantic ( ) , Collections . < String > emptySet ( ) ) ; } else { allowedRoles . addAll ( match . getRequiredRoles ( ) ) ; } } return new SingleConstraintMatch ( SecurityInfo . EmptyRoleSemantic . PERMIT , allowedRoles ) ; }
merge all constraints as per 13 . 8 . 1 Combining Constraints