directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r543149 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
Date Thu, 31 May 2007 15:06:17 GMT
Author: elecharny
Date: Thu May 31 08:06:16 2007
New Revision: 543149

URL: http://svn.apache.org/viewvc?view=rev&rev=543149
Log:
Used generic to avoid warnings.
Removed useless casts

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java?view=diff&rev=543149&r1=543148&r2=543149
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
Thu May 31 08:06:16 2007
@@ -43,14 +43,14 @@
  */
 public class ExtendedHandler implements MessageHandler
 {
-    private Map handlers = new HashMap();
+    private Map<String, ExtendedOperationHandler> handlers = new HashMap<String,
ExtendedOperationHandler>();
 
 
     public ExtendedOperationHandler addHandler( ExtendedOperationHandler eoh )
     {
         synchronized ( handlers )
         {
-            return ( ExtendedOperationHandler ) handlers.put( eoh.getOid(), eoh );
+            return handlers.put( eoh.getOid(), eoh );
         }
     }
 
@@ -59,14 +59,14 @@
     {
         synchronized ( handlers )
         {
-            return ( ExtendedOperationHandler ) handlers.remove( oid );
+            return handlers.remove( oid );
         }
     }
 
 
     public ExtendedOperationHandler getHandler( String oid )
     {
-        return ( ExtendedOperationHandler ) handlers.get( oid );
+        return handlers.get( oid );
     }
 
 
@@ -79,7 +79,7 @@
     public void messageReceived( IoSession session, Object request ) throws Exception
     {
         ExtendedRequest req = ( ExtendedRequest ) request;
-        ExtendedOperationHandler handler = ( ExtendedOperationHandler ) handlers.get( req.getOid()
);
+        ExtendedOperationHandler handler = handlers.get( req.getOid() );
 
         if ( handler == null )
         {



Mime
View raw message