mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 19:15:52 +01:00
Heed peer review remarks
This commit is contained in:
@@ -27,6 +27,13 @@ package sonia.scm.repository;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Manages namespaces. Mind that namespaces do not have a lifecycle on their own, but only do exist through
|
||||
* repositories. Therefore you cannot create or delete namespaces, but just change related settings like permissions
|
||||
* associated with them.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
public interface NamespaceManager {
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,11 +119,16 @@ public class RepositoryPermission implements PermissionObject, Serializable
|
||||
final RepositoryPermission other = (RepositoryPermission) obj;
|
||||
|
||||
return Objects.equal(name, other.name)
|
||||
&& (verbs == null && other.verbs == null || verbs != null && other.verbs != null && CollectionUtils.isEqualCollection(verbs, other.verbs))
|
||||
&& equalVerbs(other)
|
||||
&& Objects.equal(role, other.role)
|
||||
&& Objects.equal(groupPermission, other.groupPermission);
|
||||
}
|
||||
|
||||
public boolean equalVerbs(RepositoryPermission other) {
|
||||
return verbs == null && other.verbs == null
|
||||
|| verbs != null && other.verbs != null && CollectionUtils.isEqualCollection(verbs, other.verbs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hash code value for the {@link RepositoryPermission}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user