7081796: (ch) rawtype warning in sun.nio.ch.InheritedChannel

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 22 02:02:40 PDT 2011


Sasha's recent good work to eliminate warnings from the NIO area [1] 
missed one raw type warning in one source file. I suspect it was missed 
because he was mostly working on Windows and also because in a full 
build, this class is compiled implicitly when compiling other areas that 
don't have JAVAC_MAX_WARNINGS and JAVAC_WARNINGS_FATAL enabled. 
Sebastian Sickelmann ran this into this [2] when compiling this class 
with make/java/nio/Makefile as that enables JAVAC_WARNINGS_FATAL.

The change to eliminate the raw type warning is trivial:

diff --git a/src/solaris/classes/sun/nio/ch/InheritedChannel.java 
b/src/solaris/classes/sun/nio/ch/InheritedChannel.java
--- a/src/solaris/classes/sun/nio/ch/InheritedChannel.java
+++ b/src/solaris/classes/sun/nio/ch/InheritedChannel.java
@@ -166,8 +166,8 @@ class InheritedChannel {
         // is implemented.
 
         Class paramTypes[] = { int.class };
-        Constructor ctr = 
Reflect.lookupConstructor("java.io.FileDescriptor",
-                                                    paramTypes);
+        Constructor<?> ctr = 
Reflect.lookupConstructor("java.io.FileDescriptor",
+                                                       paramTypes);
         Object args[] = { new Integer(fdVal) };
         FileDescriptor fd = (FileDescriptor)Reflect.invoke(ctr, args);

Thanks,
Alan.

[1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7525866a4046
[2] http://mail.openjdk.java.net/pipermail/build-dev/2011-August/004963.html


More information about the nio-dev mailing list