From db3c086d391f18c789b5a85942b7a444a485e1c9 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 9 Nov 2011 15:05:05 +0100 Subject: [PATCH] [Minor] minor message change where if is false, the policy, deny and allow must be defined. This is now better communicated in the exception message --- src/ch/eitchnet/privilege/model/internal/Privilege.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ch/eitchnet/privilege/model/internal/Privilege.java b/src/ch/eitchnet/privilege/model/internal/Privilege.java index 96fa4b418..2ee6121f5 100644 --- a/src/ch/eitchnet/privilege/model/internal/Privilege.java +++ b/src/ch/eitchnet/privilege/model/internal/Privilege.java @@ -101,17 +101,17 @@ public final class Privilege { // not all allowed, so policy must be set 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; 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); 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); }