#24 Proxy interface missing Object methods

closed-fixed
nobody
General (151)
5
2001-06-07
2001-03-14
Anonymous
No

In XThis.java, the invoke() method of the Handler class does not implement the Object protocol. I think that it should. The particular method that I'm missing is hashCode() (and probably equals(), but I haven't gotten that far yet), but I think it should do the right thing for all the Object methods.

The code that I used to find this was:

toolkit = java.awt.Toolkit.getDefaultToolkit();
handler = (java.awt.event.AWTEventListener)this;
toolkit.addAWTEventListener(handler, 0x20);

I wanted to track the mouse position so that I could control it with a java.awt.Robot.

For now, I can work around the bug by writing the methods I need, but I think Beanshell should do this for me.

My reading of the documentation implies that I shouldn't need the explicit cast to java.awt.AWTEventListener, but it didn't work otherwise.

Discussion

  • Pat Niemeyer
    Pat Niemeyer
    2001-06-07

    Logged In: YES
    user_id=18885

    Fixed in 1.1a13

     
  • Pat Niemeyer
    Pat Niemeyer
    2001-06-07

    • status: open --> closed-fixed