Hello, 

I have a small question concerning Jeremie stubs.

As far as I have experienced, two stubs corresponding to the same remote
object are considered "equals", but do not return the same hashCode.

Note that two different java.rmi stubs to the same remote object return the
same hashcode.

Is that a bug ? What would be the best method if I want to build a hashtable
associating some values to remote objects ? I can imagine some methods, like
using a key that is a "stub wrapper" :
class StubWrapper{
        Object contents;
        public boolean equals(Object other) {
                if (! (other instanceof StubWrapper)) return false;
                if ( ((StubWrapper)other).contents.equals(contents)) return
true;
                return false;
        }
        public int hashCode(){ return 0;}
}

but it does not look very nice...

Anne  
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonathan".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to