Code Review Request: 7090158 Networking Libraries don't build with javac -Werror
Tom Hawtin
tom.hawtin at oracle.com
Wed Sep 14 10:16:47 PDT 2011
On 14/09/2011 16:46, Kurchi Hazra wrote:
> + Class<?>[] cl = new Class[2];
> + cl[0] = SocketAddress.class;
> + cl[1] = Integer.TYPE;
> + Class<?> clazz = impl.getClass();
I have to say, I think that would read better as:
Class<?>[] cl = { SocketAddress.class, int.class };
Class<?> clazz = impl.getClass();
Or better, remove cl and change:
clazz.getDeclaredMethod("connect", cl);
to:
clazz.getDeclaredMethod(
"connect", SocketAddress.class, int.class
);
Tom
More information about the net-dev
mailing list