Heed peer review remarks

This commit is contained in:
René Pfeuffer
2020-09-18 16:02:20 +02:00
parent 70dcb9ca81
commit b1c0ec15a7
11 changed files with 49 additions and 19 deletions

View File

@@ -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 {
/**

View File

@@ -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}.
*