[Minor] minor message change where if <AllAllowed> is false, the policy,

deny and allow must be defined. This is now better communicated in the
exception message
This commit is contained in:
Robert von Burg 2011-11-09 15:05:05 +01:00
parent cb6215b235
commit db3c086d39
1 changed files with 3 additions and 3 deletions

View File

@ -101,17 +101,17 @@ public final class Privilege {
// not all allowed, so policy must be set // not all allowed, so policy must be set
if (policy == null || policy.isEmpty()) { if (policy == null || policy.isEmpty()) {
throw new PrivilegeException("No Policy defined!"); throw new PrivilegeException("All is not allowed and no Policy defined!");
} }
this.policy = policy; this.policy = policy;
if (denyList == null) { if (denyList == null) {
throw new PrivilegeException("No denyList defined!"); throw new PrivilegeException("All is not allowed and no denyList defined!");
} }
this.denyList = Collections.unmodifiableSet(denyList); this.denyList = Collections.unmodifiableSet(denyList);
if (allowList == null) { if (allowList == null) {
throw new PrivilegeException("No allowList defined!"); throw new PrivilegeException("All is not allowed and no allowList defined!");
} }
this.allowList = Collections.unmodifiableSet(allowList); this.allowList = Collections.unmodifiableSet(allowList);
} }