src/main/java/org/jboss/net/sockets/MethodHash.java
/*
   * The use of hashCode is not enough to differenciate methods
   * we override the hashCode
   *
   * The hashes are cached in a static for efficiency
   * RO: WeakHashMap needed to support undeploy
   */
The use of hashCode is not enough to differenciate methods
we override the hashCode

The hashes are cached in a static for efficiency
RO: WeakHashMap needed to support undeploy
The use of hashCode is not enough to differenciate methods we override the hashCode The hashes are cached in a static for efficiency RO : WeakHashMap needed to support undeploy
public static long calculateHash(Method method)
   {
      Map methodHashes = (Map)hashMap.get(method.getDeclaringClass());
      if (methodHashes == null)
      {
         methodHashes = getInterfaceHashes(method.getDeclaringClass());
         WeakHashMap newHashMap = new WeakHashMap();
         newHashMap.putAll(hashMap);
         newHashMap.put(method.getDeclaringClass(), methodHashes);
         hashMap = newHashMap;
      }
      return ((Long)methodHashes.get(method.toString())).longValue();
   }
public static long calculateHash ( Method method ) { Map methodHashes = ( Map ) hashMap . get ( method . getDeclaringClass ( ) ) ; if ( methodHashes == null ) { methodHashes = getInterfaceHashes ( method . getDeclaringClass ( ) ) ; WeakHashMap newHashMap = new WeakHashMap ( ) ; newHashMap . putAll ( hashMap ) ; newHashMap . put ( method . getDeclaringClass ( ) , methodHashes ) ; hashMap = newHashMap ; } return ( ( Long ) methodHashes . get ( method . toString ( ) ) ) . longValue ( ) ; }
The use of hashCode is not enough to differenciate methods
 we override the hashCode
The use of hashCode is not enough to differenciate methods we override the hashCode
// Copy and add