directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r581669 - in /directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server: ReferralITest.java ReferralTest.java
Date Wed, 03 Oct 2007 17:56:37 GMT
Author: szoerner
Date: Wed Oct  3 10:56:37 2007
New Revision: 581669

URL: http://svn.apache.org/viewvc?rev=581669&view=rev
Log:
Modified to use Java 5 Generics and omit raw type warnings. 

Modified:
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralITest.java?rev=581669&r1=581668&r2=581669&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralITest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralITest.java
Wed Oct  3 10:56:37 2007
@@ -301,7 +301,7 @@
         NamingEnumeration ii = ctx.search( "", filter, controls );
     
         // collect all results
-        Set results = new HashSet();
+        Set<String> results = new HashSet<String>();
     
         while ( ii.hasMore() )
         {
@@ -336,14 +336,14 @@
      */
     private Set search( LdapContext ctx, String filter, SearchControls controls ) throws
NamingException
     {
-        NamingEnumeration ii = ctx.search( "", filter, controls );
+        NamingEnumeration<SearchResult> ii = ctx.search( "", filter, controls );
 
         // collect all results
-        Set results = new HashSet();
+        Set<String> results = new HashSet<String>();
 
         while ( ii.hasMore() )
         {
-            SearchResult result = ( SearchResult ) ii.next();
+            SearchResult result = ii.next();
             results.add( result.getName() );
         }
 

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java?rev=581669&r1=581668&r2=581669&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java
Wed Oct  3 10:56:37 2007
@@ -865,7 +865,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        Map results = new HashMap();
+        Map<String,SearchResult> results = new HashMap<String,SearchResult>();
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
@@ -880,7 +880,7 @@
 
         td.rootCtx.addToEnvironment( Context.REFERRAL, "throw" );
         list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        results = new HashMap();
+        results = new HashMap<String,SearchResult>();
 
         try
         {
@@ -906,7 +906,7 @@
 
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        results = new HashMap();
+        results = new HashMap<String,SearchResult>();
 
         try
         {



Mime
View raw message