directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r479160 - in /directory/trunks/shared/ldap/src: main/java/org/apache/directory/shared/ldap/ main/java/org/apache/directory/shared/ldap/codec/ main/java/org/apache/directory/shared/ldap/codec/actions/ main/java/org/apache/directory/shared/ld...
Date Sat, 25 Nov 2006 18:27:45 GMT
Author: elecharny
Date: Sat Nov 25 10:27:44 2006
New Revision: 479160

URL: http://svn.apache.org/viewvc?view=rev&rev=479160
Log:
Get rid of some warnings.

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/MultiException.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/RuntimeMultiException.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnect.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/MultiException.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/MultiException.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/MultiException.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/MultiException.java
Sat Nov 25 10:27:44 2006
@@ -39,7 +39,7 @@
     static final long serialVersionUID = 2889747406899775761L;
 
     /** Collection of nested exceptions. */
-    private Collection m_nestedExceptions = new ArrayList();
+    private Collection<Throwable> nestedExceptions = new ArrayList<Throwable>();
 
 
     /**
@@ -54,12 +54,12 @@
     /**
      * Constructs an Exception with a detailed message.
      * 
-     * @param a_message
+     * @param message
      *            The message associated with the exception.
      */
-    public MultiException(String a_message)
+    public MultiException( String message )
     {
-        super( a_message );
+        super( message );
     }
 
 
@@ -68,9 +68,9 @@
      * 
      * @return an Iterator over the nested exceptions.
      */
-    public Iterator listNestedExceptions()
+    public Iterator<Throwable> listNestedExceptions()
     {
-        return m_nestedExceptions.iterator();
+        return nestedExceptions.iterator();
     }
 
 
@@ -82,7 +82,7 @@
      */
     public int size()
     {
-        return m_nestedExceptions.size();
+        return nestedExceptions.size();
     }
 
 
@@ -94,19 +94,19 @@
      */
     public boolean isEmpty()
     {
-        return m_nestedExceptions.isEmpty();
+        return nestedExceptions.isEmpty();
     }
 
 
     /**
      * Add an exeception to this multiexception.
      * 
-     * @param a_nested
+     * @param nested
      *            exception to add to this MultiException.
      */
-    public void addThrowable( Throwable a_nested )
+    public void addThrowable( Throwable nested )
     {
-        this.m_nestedExceptions.add( a_nested );
+        nestedExceptions.add( nested );
     }
 
 
@@ -118,29 +118,31 @@
      * Beside printing out the standard stack trace this method prints out the
      * stack traces of all the nested exceptions.
      * 
-     * @param an_out
+     * @param out
      *            PrintWriter to write the nested stack trace to.
      */
-    public void printStackTrace( PrintWriter an_out )
+    public void printStackTrace( PrintWriter out )
     {
-        super.printStackTrace( an_out );
+        super.printStackTrace( out );
 
-        an_out.println( "Nested exceptions to follow:\n" );
-        Iterator l_list = listNestedExceptions();
-        Throwable l_throwable = null;
-        while ( l_list.hasNext() )
+        out.println( "Nested exceptions to follow:\n" );
+        boolean isFirst = true;
+
+        for ( Throwable throwable:nestedExceptions )
         {
-            l_throwable = ( Throwable ) l_list.next();
-            l_throwable.printStackTrace();
-            if ( l_list.hasNext() )
+            if ( isFirst )
             {
-                an_out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
+                isFirst = false;
             }
             else
             {
-                an_out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
+                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
             }
+
+            throwable.printStackTrace();
         }
+        
+        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
     }
 
 
@@ -148,29 +150,31 @@
      * Beside printing out the standard stack trace this method prints out the
      * stack traces of all the nested exceptions.
      * 
-     * @param an_out
+     * @param out
      *            PrintStream to write the nested stack trace to.
      */
-    public void printStackTrace( PrintStream an_out )
+    public void printStackTrace( PrintStream out )
     {
-        super.printStackTrace( an_out );
+        super.printStackTrace( out );
 
-        an_out.println( "Nested exceptions to follow:\n" );
-        Iterator l_list = listNestedExceptions();
-        Throwable l_throwable = null;
-        while ( l_list.hasNext() )
+        out.println( "Nested exceptions to follow:\n" );
+        boolean isFirst = true;
+
+        for ( Throwable throwable:nestedExceptions )
         {
-            l_throwable = ( Throwable ) l_list.next();
-            l_throwable.printStackTrace();
-            if ( l_list.hasNext() )
+            if ( isFirst )
             {
-                an_out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
+                isFirst = false;
             }
             else
             {
-                an_out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
+                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
             }
+
+            throwable.printStackTrace();
         }
+        
+        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/RuntimeMultiException.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/RuntimeMultiException.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/RuntimeMultiException.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/RuntimeMultiException.java
Sat Nov 25 10:27:44 2006
@@ -40,7 +40,7 @@
     static final long serialVersionUID = 8582253398936366771L;
 
     /** Collection of nested exceptions. */
-    private Collection m_nestedExceptions = new ArrayList();
+    private Collection<Throwable> nestedExceptions = new ArrayList<Throwable>();
 
 
     /**
@@ -55,12 +55,12 @@
     /**
      * Constructs an Exception with a detailed message.
      * 
-     * @param a_message
+     * @param message
      *            The message associated with the exception.
      */
-    public RuntimeMultiException(String a_message)
+    public RuntimeMultiException(String message)
     {
-        super( a_message );
+        super( message );
     }
 
 
@@ -69,9 +69,9 @@
      * 
      * @return an Iterator over the nested exceptions.
      */
-    public Iterator listNestedExceptions()
+    public Iterator<Throwable> listNestedExceptions()
     {
-        return m_nestedExceptions.iterator();
+        return nestedExceptions.iterator();
     }
 
 
@@ -82,7 +82,7 @@
      */
     public int size()
     {
-        return m_nestedExceptions.size();
+        return nestedExceptions.size();
     }
 
 
@@ -93,19 +93,19 @@
      */
     public boolean isEmpty()
     {
-        return m_nestedExceptions.isEmpty();
+        return nestedExceptions.isEmpty();
     }
 
 
     /**
      * Add an exeception to this multiexception.
      * 
-     * @param a_nested
+     * @param nested
      *            exception to add to this MultiException.
      */
-    public void addThrowable( Throwable a_nested )
+    public void addThrowable( Throwable nested )
     {
-        this.m_nestedExceptions.add( a_nested );
+        nestedExceptions.add( nested );
     }
 
 
@@ -117,29 +117,31 @@
      * Beside printing out the standard stack trace this method prints out the
      * stack traces of all the nested exceptions.
      * 
-     * @param an_out
+     * @param out
      *            PrintWriter to write the nested stack trace to.
      */
-    public void printStackTrace( PrintWriter an_out )
+    public void printStackTrace( PrintWriter out )
     {
-        super.printStackTrace( an_out );
+        super.printStackTrace( out );
 
-        an_out.println( "Nested exceptions to follow:\n" );
-        Iterator l_list = listNestedExceptions();
-        Throwable l_throwable = null;
-        while ( l_list.hasNext() )
+        out.println( "Nested exceptions to follow:\n" );
+        boolean isFirst = true;
+        
+        for ( Throwable throwable:nestedExceptions )
         {
-            l_throwable = ( Throwable ) l_list.next();
-            l_throwable.printStackTrace();
-            if ( l_list.hasNext() )
+            if ( isFirst )
             {
-                an_out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
+                isFirst = false;
             }
             else
             {
-                an_out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
+                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
             }
+
+            throwable.printStackTrace();
         }
+        
+        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
     }
 
 
@@ -147,29 +149,31 @@
      * Beside printing out the standard stack trace this method prints out the
      * stack traces of all the nested exceptions.
      * 
-     * @param an_out
+     * @param out
      *            PrintStream to write the nested stack trace to.
      */
-    public void printStackTrace( PrintStream an_out )
+    public void printStackTrace( PrintStream out )
     {
-        super.printStackTrace( an_out );
+        super.printStackTrace( out );
+
+        out.println( "Nested exceptions to follow:\n" );
+        boolean isFirst = true;
 
-        an_out.println( "Nested exceptions to follow:\n" );
-        Iterator l_list = listNestedExceptions();
-        Throwable l_throwable = null;
-        while ( l_list.hasNext() )
+        for ( Throwable throwable:nestedExceptions )
         {
-            l_throwable = ( Throwable ) l_list.next();
-            l_throwable.printStackTrace();
-            if ( l_list.hasNext() )
+            if ( isFirst )
             {
-                an_out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
+                isFirst = false;
             }
             else
             {
-                an_out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
+                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n"
);
             }
+
+            throwable.printStackTrace();
         }
+        
+        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n"
);
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
Sat Nov 25 10:27:44 2006
@@ -71,7 +71,7 @@
     private Asn1Object protocolOp;
 
     /** The controls */
-    private ArrayList controls;
+    private ArrayList<Control> controls;
 
     /** The current control */
     private transient Control currentControl;
@@ -143,11 +143,13 @@
     public void addControl( Control control )
     {
         currentControl = control;
-        if ( this.controls == null )
+        
+        if ( controls == null )
         {
-            this.controls = new ArrayList();
+            controls = new ArrayList<Control>();
         }
-        this.controls.add( control );
+        
+        controls.add( control );
     }
 
 
@@ -156,7 +158,7 @@
      */
     public void initControls()
     {
-        controls = new ArrayList();
+        controls = new ArrayList<Control>();
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Sat Nov 25 10:27:44 2006
@@ -34,6 +34,7 @@
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 
 /**
@@ -112,7 +113,7 @@
     private transient byte[] errorMessageBytes;
 
     /** The referrals, if any. This is an optional element */
-    private ArrayList referrals;
+    private List<LdapURL> referrals;
 
     /** The inner size of the referrals sequence */
     private transient int referralsLength;
@@ -137,7 +138,7 @@
      */
     public void initReferrals()
     {
-        referrals = new ArrayList();
+        referrals = new ArrayList<LdapURL>();
     }
     
     /**
@@ -189,7 +190,7 @@
      * 
      * @return Returns the referrals.
      */
-    public ArrayList getReferrals()
+    public List<LdapURL> getReferrals()
     {
         return referrals;
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
Sat Nov 25 10:27:44 2006
@@ -23,6 +23,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
@@ -91,7 +92,6 @@
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.Message;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.ModifyDnRequestImpl;
 import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
@@ -99,7 +99,6 @@
 import org.apache.directory.shared.ldap.message.PersistentSearchControl;
 import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.ScopeEnum;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.message.SearchResponseDoneImpl;
 import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
@@ -407,7 +406,7 @@
                     branch = new BranchNode( BranchNode.NOT );
                 }
 
-                ArrayList filtersSet = ( ( ConnectorFilter ) twixFilter ).getFilterSet();
+                List<Filter> filtersSet = ( ( ConnectorFilter ) twixFilter ).getFilterSet();
 
                 // Loop on all AND/OR children
                 if ( filtersSet != null )
@@ -510,7 +509,7 @@
                     SubstringFilter filter = ( SubstringFilter ) twixFilter;
                     String initialString = null;
                     String finalString = null;
-                    ArrayList anyString = null;
+                    List<String> anyString = null;
 
                     if ( filter.getInitialSubstrings() != null )
                     {
@@ -525,7 +524,7 @@
                     if ( filter.getAnySubstrings() != null )
                     {
                         Iterator iter = filter.getAnySubstrings().iterator();
-                        anyString = new ArrayList();
+                        anyString = new ArrayList<String>();
 
                         while ( iter.hasNext() )
                         {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
Sat Nov 25 10:27:44 2006
@@ -58,7 +58,7 @@
     /** Speedup for logs */
     private static final boolean IS_DEBUG = log.isDebugEnabled();
 
-    private static Map controlDecoders = new HashMap();
+    private static Map<String, ControlDecoder> controlDecoders = new HashMap<String,
ControlDecoder>();
 
 
     public ControlValueAction()

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Sat Nov 25 10:27:44 2006
@@ -90,10 +90,10 @@
     private transient int attributesLength;
 
     /** The list of all attributes length */
-    private transient List attributeLength;
+    private transient List<Integer> attributeLength;
 
     /** The list of all vals length */
-    private transient List valuesLength;
+    private transient List<Integer> valuesLength;
 
 
     // ~ Constructors
@@ -244,8 +244,8 @@
         if ( ( attributes != null ) && ( attributes.size() != 0 ) )
         {
             NamingEnumeration attributeIterator = attributes.getAll();
-            attributeLength = new LinkedList();
-            valuesLength = new LinkedList();
+            attributeLength = new LinkedList<Integer>();
+            valuesLength = new LinkedList<Integer>();
 
             // Compute the attributes length
             while ( attributeIterator.hasMoreElements() )
@@ -295,8 +295,8 @@
                 // add the attribute length to the attributes length
                 attributesLength += 1 + TLV.getNbBytes( localAttributeLength ) + localAttributeLength;
 
-                attributeLength.add( new Integer( localAttributeLength ) );
-                valuesLength.add( new Integer( localValuesLength ) );
+                attributeLength.add(localAttributeLength );
+                valuesLength.add( localValuesLength );
             }
         }
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnect.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnect.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnect.java
Sat Nov 25 10:27:44 2006
@@ -50,7 +50,7 @@
 public class GracefulDisconnect extends GracefulAction
 {
     /** List of the alternate servers to use */
-    private List replicatedContexts;
+    private List<LdapURL> replicatedContexts;
 
     /** Length of the sequence */
     private transient int gracefulDisconnectSequenceLength;
@@ -65,12 +65,12 @@
      * @param timeOffline The time the server will be offline
      * @param delay The delay before the disconnection
      */
-    public GracefulDisconnect(int timeOffline, int delay)
+    public GracefulDisconnect( int timeOffline, int delay )
     {
         super( timeOffline, delay );
 
         // Two urls will be enough, generally
-        this.replicatedContexts = new ArrayList( 2 );
+        replicatedContexts = new ArrayList<LdapURL>( 2 );
     }
 
 
@@ -82,7 +82,7 @@
         super();
 
         // Two urls will be enough, generally
-        this.replicatedContexts = new ArrayList( 2 );
+        replicatedContexts = new ArrayList<LdapURL>( 2 );
     }
 
 
@@ -91,7 +91,7 @@
      * 
      * @return The list of replicated servers
      */
-    public List getReplicatedContexts()
+    public List<LdapURL> getReplicatedContexts()
     {
         return replicatedContexts;
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
Sat Nov 25 10:27:44 2006
@@ -47,7 +47,7 @@
 
     private byte[] procedure;
 
-    private ArrayList parameters = new ArrayList();
+    private List<StoredProcedureParameter> parameters = new ArrayList<StoredProcedureParameter>();
 
     private transient StoredProcedureParameter currentParameter;
     
@@ -58,13 +58,13 @@
     private transient int parametersLength;
 
     /** The list of all parameter lengths */
-    private transient List parameterLength;
+    private transient List<Integer> parameterLength;
 
     /** The list of all parameter type lengths */
-    private transient List paramTypeLength;
+    private transient List<Integer> paramTypeLength;
 
     /** The list of all parameter value lengths */
-    private transient List paramValueLength;
+    private transient List<Integer> paramValueLength;
 
     public String getLanguage()
     {
@@ -90,7 +90,7 @@
     }
 
 
-    public List getParameters()
+    public List<StoredProcedureParameter> getParameters()
     {
         return parameters;
     }
@@ -189,9 +189,9 @@
     	// Compute parameters length value
     	if ( parameters != null )
     	{
-            parameterLength = new LinkedList();
-            paramTypeLength = new LinkedList();
-            paramValueLength = new LinkedList();
+            parameterLength = new LinkedList<Integer>();
+            paramTypeLength = new LinkedList<Integer>();
+            paramValueLength = new LinkedList<Integer>();
             
     		Iterator params = parameters.iterator();
     		
@@ -210,9 +210,9 @@
     			
     			parametersLength += 1 + TLV.getNbBytes( localParameterLength ) + localParameterLength;
     			
-    			parameterLength.add( new Integer( localParameterLength ) );
-    			paramTypeLength.add( new Integer( localParamTypeLength ) );
-    			paramValueLength.add( new Integer( localParamValueLength ) );
+    			parameterLength.add( localParameterLength );
+    			paramTypeLength.add( localParamTypeLength );
+    			paramValueLength.add( localParamValueLength );
     		}
     	}
     	

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
Sat Nov 25 10:27:44 2006
@@ -87,7 +87,7 @@
     private LdapDN object;
 
     /** The modifications list. This is an array of ModificationItem. */
-    private ArrayList modifications;
+    private List<ModificationItem> modifications;
 
     /** The current attribute being decoded */
     private transient Attribute currentAttribute;
@@ -102,13 +102,13 @@
     private transient int modificationsLength;
 
     /** The modification sequence length */
-    private transient List modificationSequenceLength;
+    private transient List<Integer> modificationSequenceLength;
 
     /** The list of all modification length */
-    private transient List modificationLength;
+    private transient List<Integer> modificationLength;
 
     /** The list of all vals length */
-    private transient List valuesLength;
+    private transient List<Integer> valuesLength;
 
 
     // ~ Constructors
@@ -142,7 +142,7 @@
      */
     public void initModifications()
     {
-        modifications = new ArrayList();
+        modifications = new ArrayList<ModificationItem>();
     }
 
 
@@ -151,7 +151,7 @@
      * 
      * @return Returns the modifications.
      */
-    public ArrayList getModifications()
+    public List<ModificationItem> getModifications()
     {
         return modifications;
     }
@@ -168,7 +168,7 @@
 
         if ( currentAttribute == null )
         {
-            modifications = new ArrayList();
+            modifications = new ArrayList<ModificationItem>();
         }
     }
 
@@ -320,9 +320,9 @@
         if ( ( modifications != null ) && ( modifications.size() != 0 ) )
         {
             Iterator modificationsIterator = modifications.iterator();
-            modificationSequenceLength = new LinkedList();
-            modificationLength = new LinkedList();
-            valuesLength = new LinkedList();
+            modificationSequenceLength = new LinkedList<Integer>();
+            modificationLength = new LinkedList<Integer>();
+            valuesLength = new LinkedList<Integer>();
 
             while ( modificationsIterator.hasNext() )
             {
@@ -377,9 +377,9 @@
                     + localModificationSequenceLength;
 
                 // Store the arrays of values
-                valuesLength.add( new Integer( localValuesLength ) );
-                modificationLength.add( new Integer( localModificationLength ) );
-                modificationSequenceLength.add( new Integer( localModificationSequenceLength
) );
+                valuesLength.add( localValuesLength );
+                modificationLength.add( localModificationLength );
+                modificationSequenceLength.add( localModificationSequenceLength );
             }
 
             // Add the modifications length to the modificationRequestLength

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
Sat Nov 25 10:27:44 2006
@@ -22,7 +22,7 @@
 
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -54,7 +54,7 @@
      * 
      * @return Returns the andFilter.
      */
-    public ArrayList getAndFilter()
+    public List<Filter> getAndFilter()
     {
         return filterSet;
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
Sat Nov 25 10:27:44 2006
@@ -26,6 +26,7 @@
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 
 /**
@@ -40,7 +41,7 @@
     // ----------------------------------------------------------------------------
 
     /** The set of filters used by And/Or filters */
-    protected ArrayList filterSet;
+    protected List<Filter> filterSet;
 
     /** The filters length */
     protected transient int filtersLength;
@@ -70,7 +71,7 @@
 
         if ( filterSet == null )
         {
-            filterSet = new ArrayList();
+            filterSet = new ArrayList<Filter>();
         }
 
         filterSet.add( filter );
@@ -82,7 +83,7 @@
      * 
      * @return And array of filters
      */
-    public ArrayList getFilterSet()
+    public List<Filter> getFilterSet()
     {
         return filterSet;
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
Sat Nov 25 10:27:44 2006
@@ -22,7 +22,7 @@
 
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -56,7 +56,7 @@
      * 
      * @return Returns the orFilter.
      */
-    public ArrayList getOrFilter()
+    public List<Filter> getOrFilter()
     {
         return filterSet;
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
Sat Nov 25 10:27:44 2006
@@ -86,7 +86,7 @@
      * @param finalPattern
      *            the final fragment
      */
-    public SubstringNode(ArrayList anyPattern, String attribute, String initialPattern, String
finalPattern)
+    public SubstringNode( List<String> anyPattern, String attribute, String initialPattern,
String finalPattern )
     {
         super( attribute, SUBSTRING );
 

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
Sat Nov 25 10:27:44 2006
@@ -21,7 +21,6 @@
 
 
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.naming.NamingException;
@@ -121,7 +120,7 @@
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
@@ -294,7 +293,7 @@
         assertEquals( 21, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
@@ -417,7 +416,7 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 3, modifications.size() );
 
@@ -548,7 +547,7 @@
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
@@ -1084,7 +1083,7 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 
@@ -1167,7 +1166,7 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 
@@ -1258,7 +1257,7 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        ArrayList modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java?view=diff&rev=479160&r1=479159&r2=479160
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
Sat Nov 25 10:27:44 2006
@@ -23,6 +23,7 @@
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.naming.NamingException;
@@ -179,7 +180,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
 
         // (& (| (...
         assertEquals( 2, andFilters.size() );
@@ -187,7 +188,7 @@
         assertNotNull( orFilter );
 
         // (& (| (obectclass=top) (...
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
         AttributeValueAssertionFilter equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get(
0 );
         assertNotNull( equalityMatch );
@@ -346,7 +347,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
 
         // (& (| (...
         assertEquals( 2, andFilters.size() );
@@ -354,7 +355,7 @@
         assertNotNull( orFilter );
 
         // (& (| (objectclass~=top) (...
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
         AttributeValueAssertionFilter approxMatch = ( AttributeValueAssertionFilter ) orFilters.get(
0 );
         assertNotNull( approxMatch );
@@ -523,7 +524,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
 
         // (& (| (...
         assertEquals( 2, andFilters.size() );
@@ -531,7 +532,7 @@
         assertNotNull( orFilter );
 
         // (& (| (objectclass=*) (...
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
 
         PresentFilter presentFilter = ( PresentFilter ) orFilters.get( 0 );
@@ -1061,7 +1062,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
 
         // (& (| (...
         assertEquals( 2, andFilters.size() );
@@ -1069,7 +1070,7 @@
         assertNotNull( orFilter );
 
         // (& (| (obectclass=top) (...
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
         AttributeValueAssertionFilter equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get(
0 );
         assertNotNull( equalityMatch );
@@ -1384,7 +1385,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
 
         // (& (| (...
         assertEquals( 2, andFilters.size() );
@@ -1392,7 +1393,7 @@
         assertNotNull( orFilter );
 
         // (& (| (obectclass=top) (...
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
         AttributeValueAssertionFilter equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get(
0 );
         assertNotNull( equalityMatch );
@@ -2884,7 +2885,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         SubstringFilter substringFilter = ( SubstringFilter ) andFilters.get( 0 );
@@ -3102,7 +3103,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 1, andFilters.size() );
         
         // (&(a=b))
@@ -3218,7 +3219,7 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(a=b)...
@@ -3338,14 +3339,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 1, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 1, andFilters2.size() );
 
         // (&(&(a=b)))
@@ -3461,14 +3462,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 1, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 2, andFilters2.size() );
 
         // (&(&(a=b)...
@@ -3593,14 +3594,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 1, andFilters2.size() );
 
         // (&(&(a=b))...
@@ -3729,14 +3730,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 2, andFilters2.size() );
 
         // (&(&(a=b)...
@@ -3872,14 +3873,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 1, andFilters2.size() );
 
         // (&(&(a=b)...
@@ -4016,14 +4017,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(&(..
         AndFilter andFilter2 = ( AndFilter ) andFilters.get( 0 );
         assertNotNull( andFilter2 );
 
-        ArrayList andFilters2 = andFilter2.getAndFilter();
+        List<Filter> andFilters2 = andFilter2.getAndFilter();
         assertEquals( 2, andFilters2.size() );
 
         // (&(&(a=b)...
@@ -4167,14 +4168,14 @@
         AndFilter andFilter = ( AndFilter ) sr.getFilter();
         assertNotNull( andFilter );
 
-        ArrayList andFilters = andFilter.getAndFilter();
+        List<Filter> andFilters = andFilter.getAndFilter();
         assertEquals( 2, andFilters.size() );
         
         // (&(|(..
         OrFilter orFilter = ( OrFilter ) andFilters.get( 0 );
         assertNotNull( orFilter );
 
-        ArrayList orFilters = orFilter.getOrFilter();
+        List<Filter> orFilters = orFilter.getOrFilter();
         assertEquals( 2, orFilters.size() );
 
         // (&(&(abcdef=*)...



Mime
View raw message