src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator.java

Print this page

        

*** 149,167 **** public String getClassName() { return delegate.getClassName(); } // Constructor used for factory/utility cases ! public RepIdDelegator() {} // Constructor used by getIdFromString. All non-static // RepositoryId methods will use the provided delegate. private RepIdDelegator(RepositoryId _delegate) { this.delegate = _delegate; } ! private RepositoryId delegate; public String toString() { if (delegate != null) return delegate.toString(); else --- 149,169 ---- public String getClassName() { return delegate.getClassName(); } // Constructor used for factory/utility cases ! public RepIdDelegator() { ! this(null); ! } // Constructor used by getIdFromString. All non-static // RepositoryId methods will use the provided delegate. private RepIdDelegator(RepositoryId _delegate) { this.delegate = _delegate; } ! private final RepositoryId delegate; public String toString() { if (delegate != null) return delegate.toString(); else
*** 172,177 **** --- 174,187 ---- if (delegate != null) return delegate.equals(obj); else return super.equals(obj); } + + public int hashCode() { + if (delegate != null) { + return delegate.hashCode(); + } else { + return super.hashCode(); + } + } }