question: public void validateNamespacePermissions ( List < NamespacePermissionEnum > namespacePermissions ) throws IllegalArgumentException { Assert . isTrue ( ! CollectionUtils . isEmpty ( namespacePermissions ) , "Namespace permissions must be specified." ) ; Set < NamespacePermissionEnum > validatedNamespacePermissions = new HashSet < > ( ) ; for ( NamespacePermissionEnum namespacePermission : namespacePermissions ) { if ( validatedNamespacePermissions . contains ( namespacePermission ) ) { throw new IllegalArgumentException ( String . format ( "Duplicate namespace permission \"%s\" is found." , namespacePermission . value ( ) ) ) ; } validatedNamespacePermissions . add ( namespacePermission ) ; } }
target:  Validates a list of namespace permissions.