directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r479230 - in /directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap: codec/ codec/add/ codec/search/ message/ name/ subtree/ util/
Date Sat, 25 Nov 2006 23:24:16 GMT
Author: elecharny
Date: Sat Nov 25 15:24:14 2006
New Revision: 479230

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

Modified:
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
Sat Nov 25 15:24:14 2006
@@ -30,7 +30,6 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.add.AddResponse;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
Sat Nov 25 15:24:14 2006
@@ -24,6 +24,8 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -121,18 +123,18 @@
 
         assertEquals( 2, attributes.size() );
 
-        HashSet expectedTypes = new HashSet();
+        Set<String> expectedTypes = new HashSet<String>();
 
         expectedTypes.add( "l" );
         expectedTypes.add( "attrs" );
 
-        HashMap typesVals = new HashMap();
+        Map<String, Set<String>> typesVals = new HashMap<String, Set<String>>();
 
-        HashSet lVal1 = new HashSet();
+        Set<String> lVal1 = new HashSet<String>();
         lVal1.add( "Paris" );
         typesVals.put( "l", lVal1 );
 
-        HashSet lVal2 = new HashSet();
+        Set<String> lVal2 = new HashSet<String>();
         lVal2.add( "test1" );
         lVal2.add( "test2" );
         lVal2.add( "test3" );

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
Sat Nov 25 15:24:14 2006
@@ -52,7 +52,7 @@
  */
 public class SearchRequestMatchingRuleAssertionTest extends TestCase
 {
-    static Map oids = new HashMap();
+    static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
     protected void setUp() throws Exception
     {

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
Sat Nov 25 15:24:14 2006
@@ -54,7 +54,7 @@
  */
 public class SearchRequestSubstringTest extends TestCase
 {
-    static Map oids = new HashMap();
+    static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
     protected void setUp() throws Exception
     {

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=479230&r1=479229&r2=479230
==============================================================================
--- 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 15:24:14 2006
@@ -21,7 +21,6 @@
 
 
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -65,7 +64,7 @@
  */
 public class SearchRequestTest extends TestCase
 {
-    static Map oids = new HashMap(); 
+    static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();

 
     protected void setUp() throws Exception
     {

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
Sat Nov 25 15:24:14 2006
@@ -23,6 +23,7 @@
 import java.nio.ByteBuffer;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -116,7 +117,7 @@
 
             NamingEnumeration values = attributeValue.getAll();
 
-            HashSet expectedValues = new HashSet();
+            Set<String> expectedValues = new HashSet<String>();
 
             expectedValues.add( "top" );
             expectedValues.add( "organizationalUnit" );
@@ -226,7 +227,7 @@
 
             NamingEnumeration values = attributeValue.getAll();
 
-            HashSet expectedValues = new HashSet();
+            Set<String> expectedValues = new HashSet<String>();
 
             expectedValues.add( "top" );
             expectedValues.add( "organizationalUnit" );
@@ -335,7 +336,7 @@
 
             NamingEnumeration values = attributeValue.getAll();
 
-            HashSet expectedValues = new HashSet();
+            Set<String> expectedValues = new HashSet<String>();
 
             expectedValues.add( "top" );
             expectedValues.add( "person" );

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
Sat Nov 25 15:24:14 2006
@@ -24,6 +24,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import javax.naming.NamingException;
 
@@ -121,7 +122,7 @@
 
         assertEquals( 1, message.getMessageId() );
 
-        HashSet ldapUrlsSet = new HashSet();
+        Set<String> ldapUrlsSet = new HashSet<String>();
 
         try
         {
@@ -254,7 +255,7 @@
 
         assertEquals( 1, message.getMessageId() );
 
-        HashSet ldapUrlsSet = new HashSet();
+        Set<String> ldapUrlsSet = new HashSet<String>();
 
         try
         {

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
Sat Nov 25 15:24:14 2006
@@ -39,6 +39,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 
@@ -252,7 +253,7 @@
         {
             public Collection getModificationItems()
             {
-                ArrayList list = new ArrayList();
+                List<ModificationItem> list = new ArrayList<ModificationItem>();
                 LockableAttributeImpl attr = new LockableAttributeImpl( "attr0" );
                 attr.add( "val0" );
                 attr.add( "val1" );

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Sat Nov 25 15:24:14 2006
@@ -1340,7 +1340,7 @@
     */
    public void testLdapNameList() throws InvalidNameException
    {
-       ArrayList list = new ArrayList();
+       List<String> list = new ArrayList<String>();
        list.add( "ou=People" );
        list.add( "dc=example" );
        list.add( "dc=com" );
@@ -1354,7 +1354,7 @@
     */
    public void testLdapNameIterator() throws InvalidNameException
    {
-       ArrayList list = new ArrayList();
+       List<String> list = new ArrayList<String>();
        list.add( "ou=People" );
        list.add( "dc=example" );
        list.add( "dc=com" );
@@ -1406,14 +1406,14 @@
        assertTrue( name4.compareTo( name5 ) > 0 );
        assertTrue( name2.compareTo( name5 ) < 0 );
 
-       List list = new ArrayList();
+       List<Name> list = new ArrayList<Name>();
 
-       Comparator comparator = new Comparator()
+       Comparator<Name> comparator = new Comparator<Name>()
        {
-           public int compare( Object obj1, Object obj2 )
+           public int compare( Name obj1, Name obj2 )
            {
-               Name name1 = ( LdapDN ) obj1;
-               Name name2 = ( LdapDN ) obj2;
+               Name name1 = obj1;
+               Name name2 = obj2;
                return name1.compareTo( name2 );
            }
 
@@ -2140,13 +2140,13 @@
     */
    public void testLdapNameToName() throws Exception
    {
-       ArrayList list = new ArrayList();
+       List<String> list = new ArrayList<String>();
        list.add( "ou= Some   People   " );
        list.add( "dc = eXample" );
        list.add( "dc= cOm" );
        LdapDN name = new LdapDN( list.iterator() );
 
-       Map oids = new HashMap();
+       Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
        oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
        oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer()
) );
@@ -2170,7 +2170,7 @@
    {
        LdapDN name = new LdapDN();
 
-       Map oids = new HashMap();
+       Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
        oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
        oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer()
) );
@@ -2192,7 +2192,7 @@
        LdapDN name = new LdapDN(
            "2.5.4.11= Some   People   + 0.9.2342.19200300.100.1.25=  And   Some anImAls,0.9.2342.19200300.100.1.25
= eXample,dc= cOm" );
 
-       Map oids = new HashMap();
+       Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
        oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
        oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer()
) );
@@ -2219,7 +2219,7 @@
        LdapDN name = new LdapDN(
            "2.5.4.11= Some   People   + domainComponent=  And   Some anImAls,DomainComponent
= eXample,0.9.2342.19200300.100.1.25= cOm" );
 
-       Map oids = new HashMap();
+       Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
        oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
        oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer()
) );

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
Sat Nov 25 15:24:14 2006
@@ -343,7 +343,7 @@
     public void testMultiThreaded() throws Exception
     {
         // start up and track all threads (40 threads)
-        List threads = new ArrayList();
+        List<Thread> threads = new ArrayList<Thread>();
         for ( int ii = 0; ii < 10; ii++ )
         {
             Thread t0 = new Thread( new ParseSpecification( EMPTY_SPEC ) );

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java
Sat Nov 25 15:24:14 2006
@@ -23,6 +23,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.directory.shared.ldap.util.JoinIterator;
 
@@ -84,7 +85,7 @@
 
     public void testSeveralArguments()
     {
-        ArrayList multivalued = new ArrayList();
+        List<String> multivalued = new ArrayList<String>();
         multivalued.add( "foo1" );
         multivalued.add( "foo2" );
 

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java?view=diff&rev=479230&r1=479229&r2=479230
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java
Sat Nov 25 15:24:14 2006
@@ -167,7 +167,7 @@
 
     public void testListToString()
     {
-        List list = new ArrayList();
+        List<String> list = new ArrayList<String>();
 
         list.add( "elem1" );
         list.add( "elem2" );
@@ -199,7 +199,7 @@
             }
         }
 
-        Map map = new HashMap();
+        Map<String, Value> map = new HashMap<String, Value>();
 
         map.put( "elem1", new Value( "name1", 1 ) );
         map.put( "elem2", new Value( "name2", 2 ) );



Mime
View raw message