directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r574718 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/
Date Tue, 11 Sep 2007 22:52:43 GMT
Author: elecharny
Date: Tue Sep 11 15:52:42 2007
New Revision: 574718

URL: http://svn.apache.org/viewvc?rev=574718&view=rev
Log:
Removed some more warnings by using Generics

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
Tue Sep 11 15:52:42 2007
@@ -125,24 +125,7 @@
             private static final long serialVersionUID = 1L;
 
 
-            public String getType()
-            {
-                return null;
-            }
-
-
             public void setID( String a_oid )
-            {
-            }
-
-
-            public byte[] getValue()
-            {
-                return new byte[0];
-            }
-
-
-            public void setValue( byte[] a_value )
             {
             }
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
Tue Sep 11 15:52:42 2007
@@ -188,28 +188,11 @@
             private static final long serialVersionUID = 1L;
 
 
-            public String getType()
-            {
-                return null;
-            }
-
-
             public void setID( String a_oid )
             {
             }
 
-
-            public byte[] getValue()
-            {
-                return new byte[0];
-            }
-
-
-            public void setValue( byte[] a_value )
-            {
-            }
-
-
+            
             public boolean isCritical()
             {
                 return false;

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,12 +22,13 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
 import javax.naming.directory.Attributes;
 
+import javax.naming.ldap.Control;
 import org.apache.directory.shared.ldap.message.AbandonListener;
 import org.apache.directory.shared.ldap.message.AddRequest;
 import org.apache.directory.shared.ldap.message.AddRequestImpl;
@@ -47,6 +48,8 @@
  */
 public class AddRequestImplTest extends TestCase
 {
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+	
     /**
      * Creates and populates a AttributeImpl with a specific id.
      * 
@@ -214,9 +217,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
Tue Sep 11 15:52:42 2007
@@ -20,8 +20,12 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.NoSuchElementException;
 
+import javax.naming.ldap.Control;
+
 import junit.framework.TestCase;
 
 import org.apache.directory.shared.ldap.message.ArrayNamingEnumeration;
@@ -36,7 +40,7 @@
  */
 public class ArrayNamingEnumerationTest extends TestCase
 {
-    /**
+	/**
      * Tests ArrayNamingEnumeration using an null array.
      */
     public void testUsingNullArray()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -44,7 +44,9 @@
  */
 public class BindRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()
@@ -261,9 +263,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -45,7 +45,9 @@
  */
 public class CompareRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()
@@ -198,9 +200,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -45,7 +45,9 @@
  */
 public class DeleteRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()
@@ -137,18 +139,18 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 
-            public void add( Control a_control ) throws MessageException
+            public void add( Control control ) throws MessageException
             {
             }
 
 
-            public void remove( Control a_control ) throws MessageException
+            public void remove( Control control ) throws MessageException
             {
             }
 
@@ -159,13 +161,13 @@
             }
 
 
-            public Object get( Object a_key )
+            public Object get( Object key )
             {
                 return null;
             }
 
 
-            public Object put( Object a_key, Object a_value )
+            public Object put( Object key, Object value )
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.NamingException;
@@ -44,7 +44,9 @@
  */
 public class ExtendedRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()
@@ -174,7 +176,7 @@
 
             public Map<String,Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -47,7 +47,9 @@
  */
 public class ExtendedResponseImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Creates and populates a ExtendedResponseImpl stub for testing purposes.
      * 
      * @return a populated ExtendedResponseImpl stub
@@ -164,9 +166,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -46,7 +46,9 @@
  */
 public class ModifyDnRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Constructs a ModifyDnrequest to test.
      * 
      * @return the request
@@ -280,9 +282,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
Tue Sep 11 15:52:42 2007
@@ -37,8 +37,8 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -51,7 +51,9 @@
  */
 public class ModifyRequestImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Builds a ModifyRequest for testing purposes.
      * 
      * @return the ModifyRequest to use for tests
@@ -323,9 +325,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -47,7 +47,9 @@
  */
 public class SearchResponseDoneImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Creates and populates a SearchResponseDoneImpl stub for testing purposes.
      * 
      * @return a populated SearchResponseDoneImpl stub
@@ -136,9 +138,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
@@ -46,7 +46,9 @@
  */
 public class SearchResponseEntryImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Creates and populates a AttributeImpl with a specific id.
      * 
      * @param id
@@ -149,9 +151,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java?rev=574718&r1=574717&r2=574718&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
Tue Sep 11 15:52:42 2007
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.ldap.Control;
@@ -43,7 +43,9 @@
  */
 public class SearchResponseReferenceImplTest extends TestCase
 {
-    /**
+	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String,
Control>();
+
+	/**
      * Creates a baseline referral to test with and adds it to the supplied
      * response object.
      * 
@@ -112,9 +114,9 @@
             }
 
 
-            public Map getControls()
+            public Map<String, Control> getControls()
             {
-                return Collections.EMPTY_MAP;
+                return EMPTY_CONTROL_MAP;
             }
 
 



Mime
View raw message