directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r414836 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
Date Fri, 16 Jun 2006 14:32:49 GMT
Author: ersiner
Date: Fri Jun 16 07:32:49 2006
New Revision: 414836

URL: http://svn.apache.org/viewvc?rev=414836&view=rev
Log:
Removed SP language specific stuff from addParameter method.

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java?rev=414836&r1=414835&r2=414836&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
Fri Jun 16 07:32:49 2006
@@ -187,13 +187,27 @@
     
     public void addParameter( Object type, Object value )
     {
-        if ( ! this.procedure.getLanguage().equals( "java" ) )
-        {
-            StoredProcedureParameter parameter = new StoredProcedureParameter();
-            parameter.setType( ( byte[] ) type );
-            parameter.setValue( ( byte[] ) value );
-            this.procedure.addParameter( parameter );
-        }
+        /**
+         *
+         * FIXME: Why do we check here whether it's Java or not ?
+         * Codec has nothing to do with these details.
+         *
+         if ( ! this.procedure.getLanguage().equals( "java" ) )
+         {
+             StoredProcedureParameter parameter = new StoredProcedureParameter();
+             parameter.setType( ( byte[] ) type );
+             parameter.setValue( ( byte[] ) value );
+             this.procedure.addParameter( parameter );
+         }
+         
+         * Replacing this code with the one below without the conditional check.
+         
+         */
+        
+        StoredProcedureParameter parameter = new StoredProcedureParameter();
+        parameter.setType( ( byte[] ) type );
+        parameter.setValue( ( byte[] ) value );
+        this.procedure.addParameter( parameter );
 
         // below here try to convert parameters to their appropriate byte[] representations
         



Mime
View raw message