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++) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.