directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r416890 - in /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger: AddStoredProcedureParameterInjector.java DeleteStoredProcedureParameterInjector.java ModifyStoredProcedureParameterInjector.java
Date Sat, 24 Jun 2006 08:31:52 GMT
Author: ersiner
Date: Sat Jun 24 01:31:52 2006
New Revision: 416890

URL: http://svn.apache.org/viewvc?rev=416890&view=rev
Log:
Fixed SP Param Injectors to provide clones of interceptor paramters where possible.

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java?rev=416890&r1=416889&r2=416890&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
Sat Jun 24 01:31:52 2006
@@ -19,24 +19,25 @@
 
 import java.util.Map;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.invocation.Invocation;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter.AddStoredProcedureParameter;
 
 public class AddStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
 {
-    private Name addedEntryName;
+    private LdapDN addedEntryName;
     private Attributes addedEntry;
     
     private Map injectors;
     
-    public AddStoredProcedureParameterInjector( Invocation invocation, Name addedEntryName,
Attributes addedEntry ) throws NamingException
+    public AddStoredProcedureParameterInjector( Invocation invocation, LdapDN addedEntryName,
Attributes addedEntry ) throws NamingException
     {
         super( invocation );
         this.addedEntryName = addedEntryName;
+        this.addedEntry = addedEntry;
         injectors = super.getInjectors();
         injectors.put( AddStoredProcedureParameter.ENTRY, $entryInjector.inject() );
         injectors.put( AddStoredProcedureParameter.ATTRIBUTES, $attributesInjector.inject()
);
@@ -46,7 +47,8 @@
     {
         public Object inject() throws NamingException
         {
-            return addedEntryName;
+            // Return a safe copy constructed with user provided name.
+            return new LdapDN( addedEntryName.toUpName() );
         };
     };
     
@@ -54,7 +56,7 @@
     {
         public Object inject() throws NamingException
         {
-            return addedEntry;
+            return addedEntry.clone();
         };
     };
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=416890&r1=416889&r2=416890&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
Sat Jun 24 01:31:52 2006
@@ -48,7 +48,7 @@
     {
         public Object inject() throws NamingException
         {
-            // Return a safe copy constructed with user providd name.
+            // Return a safe copy constructed with user provided name.
             return new LdapDN( deletedEntryName.toUpName() );
         };
     };

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=416890&r1=416889&r2=416890&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
Sat Jun 24 01:31:52 2006
@@ -76,7 +76,8 @@
     {
         public Object inject() throws NamingException
         {
-            return modifiedEntryName;
+            // Return a safe copy constructed with user provided name.
+            return new LdapDN( modifiedEntryName.toUpName() );
         };
     };
     
@@ -84,7 +85,7 @@
     {
         public Object inject() throws NamingException
         {
-            return modifications;
+            return modifications.clone();
         };
     };
     



Mime
View raw message