On Tue, May 26, 2009 at 09:35, Mondain <[email protected]> wrote:

> Guys,I've had no response to my query about the exception that i get in M6
> but not in M5. It is critical to setting up the Acceptors and if I have
> missed something please let me know; I would hate to see M6 go out with
> such
> an obvious difference.
> java.lang.NoSuchMethodError:
>
> org.apache.mina.transport.socket.SocketAcceptor.bind([Ljava/net/SocketAddress;)V


This method changed signature between M4 and M5.  In M5 the signature was
modified to be bind(SocketAddress ...), which is really
bind(SocketAddress[]) once the compiler gets through with it.

This was reported as a bug against M5, and unfortunately, the fix made for
M6 was to change it back to the M4 signature, of bind(SocketAddress).

Instead, the method should have been overloaded:

  bind(SocketAddress addr) {
    bind(new SocketAddress[]{addr});
  }

  bind(SocketAddress ... addr) {
  ... do real work ...
 }

so that both pre-M5 and post-M5 code can link against the methods.

I don't carry a vote around here, but if I had one, I'd say -1 on M6 until
the method is overloaded and both signatures are supported.

Reply via email to