directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r433490 - in /directory/trunks/mina/core/src/main/java/org/apache/mina: transport/vmpipe/VmPipeConnector.java util/AnonymousSocketAddress.java
Date Tue, 22 Aug 2006 03:41:05 GMT
Author: trustin
Date: Mon Aug 21 20:41:04 2006
New Revision: 433490

URL: http://svn.apache.org/viewvc?rev=433490&view=rev
Log:
Fixed issue: DIRMINA-240 (VmPipeConnectors hands out non-unique AnonymousSocketAddresses)

Modified:
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/util/AnonymousSocketAddress.java

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java?rev=433490&r1=433489&r2=433490&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
Mon Aug 21 20:41:04 2006
@@ -85,7 +85,7 @@
                 new VmPipeSessionImpl(
                         this,
                         new Object(), // lock
-                        AnonymousSocketAddress.INSTANCE,
+                        new AnonymousSocketAddress(),
                         handler,
                         config.getFilterChainBuilder(),
                         config.getThreadModel(),

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/util/AnonymousSocketAddress.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/util/AnonymousSocketAddress.java?rev=433490&r1=433489&r2=433490&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/util/AnonymousSocketAddress.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/util/AnonymousSocketAddress.java
Mon Aug 21 20:41:04 2006
@@ -30,27 +30,21 @@
 {
     private static final long serialVersionUID = 3978421416766944048L;
 
-    public static final AnonymousSocketAddress INSTANCE = new AnonymousSocketAddress();
-
     /**
      * Creates a new instance with the specifid port number.
      */
-    private AnonymousSocketAddress()
+    public AnonymousSocketAddress()
     {
     }
 
     public int hashCode()
     {
-        return 1432482932;
+        return System.identityHashCode( this );
     }
 
     public boolean equals( Object o )
     {
-        if( o == null )
-            return false;
-        if( this == o )
-            return true;
-        return o instanceof AnonymousSocketAddress;
+	return this == o;
     }
 
     public int compareTo( Object o )
@@ -60,6 +54,6 @@
 
     public String toString()
     {
-        return "anonymous";
+        return "anonymous(" + hashCode() + ')';
     }
 }



Mime
View raw message