corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator.java
changeset 18302 3b06314efbd0
parent 5555 b2b5ed3f0d0d
child 22131 4d7b21463768
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator.java	Wed Jul 05 18:58:01 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator.java	Mon Jun 10 17:15:42 2013 +0100
@@ -151,7 +151,9 @@
     }
 
     // Constructor used for factory/utility cases
-    public RepIdDelegator() {}
+    public RepIdDelegator() {
+        this(null);
+    }
 
     // Constructor used by getIdFromString.  All non-static
     // RepositoryId methods will use the provided delegate.
@@ -159,7 +161,7 @@
         this.delegate = _delegate;
     }
 
-    private RepositoryId delegate;
+    private final RepositoryId delegate;
 
     public String toString() {
         if (delegate != null)
@@ -174,4 +176,12 @@
         else
             return super.equals(obj);
     }
+
+    public int hashCode() {
+        if (delegate != null) {
+            return delegate.hashCode();
+        } else {
+            return super.hashCode();
+        }
+    }
 }