#24 Proxy interface missing Object methods

General (151)

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.


  • Pat Niemeyer

    Pat Niemeyer - 2001-06-07

    Logged In: YES

    Fixed in 1.1a13

  • Pat Niemeyer

    Pat Niemeyer - 2001-06-07
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks