Merge
authorlana
Wed, 26 Oct 2011 12:29:22 -0700
changeset 10885 3d8c212dd617
parent 10884 a7553ebbb382 (current diff)
parent 10883 d77f8ddbc904 (diff)
child 10886 ffcc9a618277
Merge
--- a/jdk/make/sun/net/Makefile	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/make/sun/net/Makefile	Wed Oct 26 12:29:22 2011 -0700
@@ -28,6 +28,7 @@
 PRODUCT = sun
 SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true
 SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
+SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = others spi
--- a/jdk/src/share/classes/java/net/InetAddress.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/java/net/InetAddress.java	Wed Oct 26 12:29:22 2011 -0700
@@ -876,10 +876,12 @@
                 nameService = java.security.AccessController.doPrivileged(
                     new java.security.PrivilegedExceptionAction<NameService>() {
                         public NameService run() {
-                            Iterator itr = Service.providers(NameServiceDescriptor.class);
+                            // sun.misc.Service.providers returns a raw Iterator
+                            @SuppressWarnings("unchecked")
+                            Iterator<NameServiceDescriptor> itr =
+                                Service.providers(NameServiceDescriptor.class);
                             while (itr.hasNext()) {
-                                NameServiceDescriptor nsd
-                                    = (NameServiceDescriptor)itr.next();
+                                NameServiceDescriptor nsd = itr.next();
                                 if (providerName.
                                     equalsIgnoreCase(nsd.getType()+","
                                         +nsd.getProviderName())) {
--- a/jdk/src/share/classes/java/net/ServerSocket.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/java/net/ServerSocket.java	Wed Oct 26 12:29:22 2011 -0700
@@ -267,10 +267,9 @@
             AccessController.doPrivileged(
                 new PrivilegedExceptionAction<Void>() {
                     public Void run() throws NoSuchMethodException {
-                        Class[] cl = new Class[2];
-                        cl[0] = SocketAddress.class;
-                        cl[1] = Integer.TYPE;
-                        impl.getClass().getDeclaredMethod("connect", cl);
+                        impl.getClass().getDeclaredMethod("connect",
+                                                          SocketAddress.class,
+                                                          int.class);
                         return null;
                     }
                 });
--- a/jdk/src/share/classes/java/nio/charset/Charset.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/java/nio/charset/Charset.java	Wed Oct 26 12:29:22 2011 -0700
@@ -435,7 +435,7 @@
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 public Object run() {
                     try {
-                        Class epc
+                        Class<?> epc
                             = Class.forName("sun.nio.cs.ext.ExtendedCharsets");
                         extendedProvider = (CharsetProvider)epc.newInstance();
                     } catch (ClassNotFoundException x) {
--- a/jdk/src/share/classes/java/security/Security.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/java/security/Security.java	Wed Oct 26 12:29:22 2011 -0700
@@ -814,7 +814,7 @@
                 public Void run() {
                     try {
                         /* Get the class via the bootstrap class loader. */
-                        Class cl = Class.forName(
+                        Class<?> cl = Class.forName(
                             "java.lang.SecurityManager", false, null);
                         Field f = null;
                         boolean accessible = false;
--- a/jdk/src/share/classes/java/text/BreakIterator.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/java/text/BreakIterator.java	Wed Oct 26 12:29:22 2011 -0700
@@ -443,7 +443,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#word">word breaks</a>
+     * for <a href="BreakIterator.html#word">word breaks</a>
      * for the {@linkplain Locale#getDefault() default locale}.
      * @return A break iterator for word breaks
      */
@@ -454,7 +454,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#word">word breaks</a>
+     * for <a href="BreakIterator.html#word">word breaks</a>
      * for the given locale.
      * @param locale the desired locale
      * @return A break iterator for word breaks
@@ -470,7 +470,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#line">line breaks</a>
+     * for <a href="BreakIterator.html#line">line breaks</a>
      * for the {@linkplain Locale#getDefault() default locale}.
      * @return A break iterator for line breaks
      */
@@ -481,7 +481,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#line">line breaks</a>
+     * for <a href="BreakIterator.html#line">line breaks</a>
      * for the given locale.
      * @param locale the desired locale
      * @return A break iterator for line breaks
@@ -497,7 +497,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#character">character breaks</a>
+     * for <a href="BreakIterator.html#character">character breaks</a>
      * for the {@linkplain Locale#getDefault() default locale}.
      * @return A break iterator for character breaks
      */
@@ -508,7 +508,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#character">character breaks</a>
+     * for <a href="BreakIterator.html#character">character breaks</a>
      * for the given locale.
      * @param locale the desired locale
      * @return A break iterator for character breaks
@@ -524,7 +524,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#sentence">sentence breaks</a>
+     * for <a href="BreakIterator.html#sentence">sentence breaks</a>
      * for the {@linkplain Locale#getDefault() default locale}.
      * @return A break iterator for sentence breaks
      */
@@ -535,7 +535,7 @@
 
     /**
      * Returns a new <code>BreakIterator</code> instance
-     * for <a href="#sentence">sentence breaks</a>
+     * for <a href="BreakIterator.html#sentence">sentence breaks</a>
      * for the given locale.
      * @param locale the desired locale
      * @return A break iterator for sentence breaks
--- a/jdk/src/share/classes/sun/nio/ch/Util.java	Tue Oct 25 10:51:17 2011 -0700
+++ b/jdk/src/share/classes/sun/nio/ch/Util.java	Wed Oct 26 12:29:22 2011 -0700
@@ -363,10 +363,10 @@
                     try {
                         Class<?> cl = Class.forName("java.nio.DirectByteBuffer");
                         Constructor<?> ctor = cl.getDeclaredConstructor(
-                            new Class[] { int.class,
-                                          long.class,
-                                          FileDescriptor.class,
-                                          Runnable.class });
+                            new Class<?>[] { int.class,
+                                             long.class,
+                                             FileDescriptor.class,
+                                             Runnable.class });
                         ctor.setAccessible(true);
                         directByteBufferConstructor = ctor;
                     } catch (ClassNotFoundException   |
@@ -408,10 +408,10 @@
                     try {
                         Class<?> cl = Class.forName("java.nio.DirectByteBufferR");
                         Constructor<?> ctor = cl.getDeclaredConstructor(
-                            new Class[] { int.class,
-                                          long.class,
-                                          FileDescriptor.class,
-                                          Runnable.class });
+                            new Class<?>[] { int.class,
+                                             long.class,
+                                             FileDescriptor.class,
+                                             Runnable.class });
                         ctor.setAccessible(true);
                         directByteBufferRConstructor = ctor;
                     } catch (ClassNotFoundException |