Author: rfrovarp
Date: Wed Jul 15 17:41:14 2009
New Revision: 794332
URL: http://svn.apache.org/viewvc?rev=794332&view=rev
Log:
Fixed potential null pointer dereference
Modified:
lenya/branches/BRANCH_2_0_X/src/modules-core/ac/java/src/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java
Modified: lenya/branches/BRANCH_2_0_X/src/modules-core/ac/java/src/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules-core/ac/java/src/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java?rev=794332&r1=794331&r2=794332&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules-core/ac/java/src/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules-core/ac/java/src/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java Wed Jul 15 17:41:14 2009
@@ -205,7 +205,9 @@
contextSource = resolver.resolveURI("context:///");
contextDir = SourceUtil.getFile(contextSource);
- if (contextDir == null || !contextDir.isDirectory()) {
+ if (contextDir == null) {
+ throw new AccessControlException("The servlet context is null!");
+ } else if(!contextDir.isDirectory()) {
throw new AccessControlException("The servlet context ["
+ contextDir.getAbsolutePath() + "] is not a directory!");
}
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.