You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/01/03 17:31:06 UTC
svn commit: r731011 -
/lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java
Author: andreas
Date: Sat Jan 3 08:31:06 2009
New Revision: 731011
URL: http://svn.apache.org/viewvc?rev=731011&view=rev
Log:
Adding assertions.
Modified:
lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java
Modified: lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java?rev=731011&r1=731010&r2=731011&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java (original)
+++ lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/URLPolicy.java Sat Jan 3 08:31:06 2009
@@ -31,6 +31,7 @@
import org.apache.lenya.ac.InheritingPolicyManager;
import org.apache.lenya.ac.Policy;
import org.apache.lenya.ac.Role;
+import org.apache.lenya.util.Assert;
/**
* A policy at a certain URL. The final policy is computed by merging the
@@ -111,6 +112,8 @@
* Iterate the policy tree bottom-up.
*/
public int check(Identity identity, Role role) throws AccessControlException {
+ Assert.notNull("identity", identity);
+ Assert.notNull("role", role);
obtainPolicies();
for (int i = 0; i < this.policies.length; i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org