directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r659736 - in /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core: authz/DefaultAuthorizationInterceptor.java interceptor/context/AbstractOperationContext.java
Date Sat, 24 May 2008 01:04:16 GMT
Author: akarasulu
Date: Fri May 23 18:04:15 2008
New Revision: 659736

URL: http://svn.apache.org/viewvc?rev=659736&view=rev
Log:
fixing regression on Invocation use which caused array index out of bounds exception when
Invocation could not be found on stack after processing search request and walking cursor

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=659736&r1=659735&r2=659736&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
Fri May 23 18:04:15 2008
@@ -507,8 +507,7 @@
         cursor.addEntryFilter( new EntryFilter() {
             public boolean accept( SearchingOperationContext operation, ClonedServerEntry
result ) throws Exception
             {
-                Invocation invocation = InvocationStack.getInstance().peek();
-                return DefaultAuthorizationInterceptor.this.isSearchable( invocation, result
);
+                return DefaultAuthorizationInterceptor.this.isSearchable( operation.getInvocation(),
result );
             }
         } );
         return cursor;
@@ -528,8 +527,7 @@
         {
             public boolean accept( SearchingOperationContext operation, ClonedServerEntry
entry ) throws Exception
             {
-                Invocation invocation = InvocationStack.getInstance().peek();
-                return DefaultAuthorizationInterceptor.this.isSearchable( invocation, entry
);
+                return DefaultAuthorizationInterceptor.this.isSearchable( operation.getInvocation(),
entry );
             }
         } );
         return cursor;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java?rev=659736&r1=659735&r2=659736&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
Fri May 23 18:04:15 2008
@@ -60,6 +60,13 @@
     /** The global registries reference */
     private Registries registries;
 
+    /** 
+     * TODO this is temporary and needs to be removed as soon as the 
+     * InvocationStack is removed.
+     */
+    private Invocation invocation;
+
+    
     /**
      * Creates a new instance of AbstractOperationContext.
      *
@@ -233,6 +240,7 @@
      */
     public void push( Invocation invocation )
     {
+        this.invocation = invocation;
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( invocation );
     }
@@ -272,4 +280,16 @@
      * @return the operation name
      */
     public abstract String getName();
+
+
+    /** 
+     * TODO this is temporary and needs to be removed as soon as the 
+     * InvocationStack is removed.
+     * 
+     * @return the invocation
+     */
+    public Invocation getInvocation()
+    {
+        return invocation;
+    }
 }



Mime
View raw message