directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1075120 - in /directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl: StoredProcedureContainer.java StoredProcedureGrammar.java StoredProcedureRequestDecorator.java
Date Sun, 27 Feb 2011 19:00:15 GMT
Author: akarasulu
Date: Sun Feb 27 19:00:15 2011
New Revision: 1075120

URL: http://svn.apache.org/viewvc?rev=1075120&view=rev
Log:
fixing overwrite of existing decorator

Modified:
    directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureContainer.java
    directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureGrammar.java
    directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureRequestDecorator.java

Modified: directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureContainer.java?rev=1075120&r1=1075119&r2=1075120&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureContainer.java
(original)
+++ directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureContainer.java
Sun Feb 27 19:00:15 2011
@@ -77,7 +77,6 @@ public class StoredProcedureContainer ex
     public void clean()
     {
         super.clean();
-
         storedProcedure = null;
     }
 }

Modified: directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureGrammar.java?rev=1075120&r1=1075119&r2=1075120&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureGrammar.java
(original)
+++ directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureGrammar.java
Sun Feb 27 19:00:15 2011
@@ -91,7 +91,12 @@ public final class StoredProcedureGramma
                 {
                     TLV tlv = container.getCurrentTLV();
 
-                    StoredProcedureRequestDecorator storedProcedure = null;
+                    StoredProcedureRequestDecorator storedProcedure = container.getStoredProcedure();
+                    if ( storedProcedure == null )
+                    {
+                        storedProcedure = new StoredProcedureRequestDecorator( LdapCodecServiceFactory.getSingleton()
);
+                        container.setStoredProcedure( storedProcedure );
+                    }
 
                     // Store the value.
                     if ( tlv.getLength() == 0 )
@@ -111,9 +116,7 @@ public final class StoredProcedureGramma
                             LOG.debug( "SP language found: " + language );
                         }
 
-                        storedProcedure = new StoredProcedureRequestDecorator( LdapCodecServiceFactory.getSingleton()
);
                         storedProcedure.setLanguage( language );
-                        container.setStoredProcedure( storedProcedure );
                     }
                 }
             } );
@@ -167,8 +170,7 @@ public final class StoredProcedureGramma
             {
                 public void action( StoredProcedureContainer container ) throws DecoderException
                 {
-                    StoredProcedureContainer storedProcedureContainer = ( StoredProcedureContainer
) container;
-                    storedProcedureContainer.setGrammarEndAllowed( true );
+                    container.setGrammarEndAllowed( true );
                 }
             } );
         

Modified: directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureRequestDecorator.java?rev=1075120&r1=1075119&r2=1075120&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureRequestDecorator.java
(original)
+++ directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureRequestDecorator.java
Sun Feb 27 19:00:15 2011
@@ -280,6 +280,8 @@ public class StoredProcedureRequestDecor
     {
         StoredProcedureDecoder decoder = new StoredProcedureDecoder();
         StoredProcedureContainer container = new StoredProcedureContainer();
+        
+        container.setStoredProcedure( this );
 
         try
         {



Mime
View raw message