Shawn Pearce wrote:
On Tue, May 26, 2009 at 09:35, Mondain <mond...@gmail.com> 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).
yeah, with was intended, as we were supposed not to change the methods'
signature, something I did by mistake. So I reverted back to what it was
before.
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.
Probably the best solution, yep. I don't know why I didn't thought about
it when I reverted the patch... My bad again.
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.
Typically a -0 vote :) The initial modification was stupid, the
correction was stupid too. Sorry for that.
At least, Mondain's issue is gone with M6.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org