7193406: Clean-up JDK Build Warnings in java.util, java.io
authordxu
Fri, 31 Aug 2012 13:42:47 -0700
changeset 13795 73850c397272
parent 13794 73e854afd84d
child 13797 6d71a40137af
7193406: Clean-up JDK Build Warnings in java.util, java.io Summary: Clean-up JDK Build Warnings in java.util, java.io Packages Reviewed-by: smarks, darcy, khazra, dholmes, forax, dl, andrew, aph, omajid, ulfzibis, christos, mduigou
jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
jdk/src/share/classes/java/io/FilePermission.java
jdk/src/share/classes/java/lang/reflect/Constructor.java
jdk/src/share/classes/java/lang/reflect/Method.java
jdk/src/share/classes/java/net/SocketPermission.java
jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java
jdk/src/share/classes/java/nio/channels/FileChannel.java
jdk/src/share/classes/java/util/ArrayDeque.java
jdk/src/share/classes/java/util/Arrays.java
jdk/src/share/classes/java/util/Collections.java
jdk/src/share/classes/java/util/ComparableTimSort.java
jdk/src/share/classes/java/util/HashMap.java
jdk/src/share/classes/java/util/JumboEnumSet.java
jdk/src/share/classes/java/util/PriorityQueue.java
jdk/src/share/classes/java/util/PropertyPermission.java
jdk/src/share/classes/java/util/PropertyResourceBundle.java
jdk/src/share/classes/java/util/jar/JarVerifier.java
jdk/src/share/classes/java/util/jar/Pack200.java
jdk/src/share/classes/sun/util/PreHashedMap.java
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Aug 31 13:42:47 2012 -0700
@@ -883,7 +883,7 @@
             avHiBits &= (1L<<attrIndexLimit[i])-1;
             int nextLoBit = 0;
             Map<Attribute.Layout, int[]> defMap = allLayouts.get(i);
-            @SuppressWarnings({ "unchecked", "rawtypes" })
+            @SuppressWarnings({"unchecked", "rawtypes"})
             Map.Entry<Attribute.Layout, int[]>[] layoutsAndCounts =
                     new Map.Entry[defMap.size()];
             defMap.entrySet().toArray(layoutsAndCounts);
--- a/jdk/src/share/classes/java/io/FilePermission.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/io/FilePermission.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,10 +31,6 @@
 import java.util.ArrayList;
 import java.util.Vector;
 import java.util.Collections;
-import java.io.ObjectStreamField;
-import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
-import java.io.IOException;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -424,7 +420,7 @@
     /**
      * Converts an actions String to an actions mask.
      *
-     * @param action the action string.
+     * @param actions the action string.
      * @return the actions mask.
      */
     private static int getMask(String actions) {
@@ -435,7 +431,9 @@
         if (actions == null) {
             return mask;
         }
-        // Check against use of constants (used heavily within the JDK)
+
+        // Use object identity comparison against known-interned strings for
+        // performance benefit (these values are used heavily within the JDK).
         if (actions == SecurityConstants.FILE_READ_ACTION) {
             return READ;
         } else if (actions == SecurityConstants.FILE_WRITE_ACTION) {
@@ -531,7 +529,7 @@
                 switch(a[i-matchlen]) {
                 case ',':
                     seencomma = true;
-                    /*FALLTHROUGH*/
+                    break;
                 case ' ': case '\r': case '\n':
                 case '\f': case '\t':
                     break;
@@ -798,7 +796,7 @@
      * @return an enumeration of all the FilePermission objects.
      */
 
-    public Enumeration elements() {
+    public Enumeration<Permission> elements() {
         // Convert Iterator into Enumeration
         synchronized (this) {
             return Collections.enumeration(perms);
@@ -843,7 +841,6 @@
     /*
      * Reads in a Vector of FilePermissions and saves them in the perms field.
      */
-    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream in) throws IOException,
     ClassNotFoundException {
         // Don't call defaultReadObject()
@@ -852,6 +849,7 @@
         ObjectInputStream.GetField gfields = in.readFields();
 
         // Get the one we want
+        @SuppressWarnings("unchecked")
         Vector<Permission> permissions = (Vector<Permission>)gfields.get("permissions", null);
         perms = new ArrayList<>(permissions.size());
         perms.addAll(permissions);
--- a/jdk/src/share/classes/java/lang/reflect/Constructor.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/lang/reflect/Constructor.java	Fri Aug 31 13:42:47 2012 -0700
@@ -182,7 +182,7 @@
      * @since 1.5
      */
     @Override
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public TypeVariable<Constructor<T>>[] getTypeParameters() {
       if (getSignature() != null) {
         return (TypeVariable<Constructor<T>>[])getGenericInfo().getTypeParameters();
--- a/jdk/src/share/classes/java/lang/reflect/Method.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/lang/reflect/Method.java	Fri Aug 31 13:42:47 2012 -0700
@@ -194,7 +194,7 @@
      * @since 1.5
      */
     @Override
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public TypeVariable<Method>[] getTypeParameters() {
         if (getGenericSignature() != null)
             return (TypeVariable<Method>[])getGenericInfo().getTypeParameters();
--- a/jdk/src/share/classes/java/net/SocketPermission.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/net/SocketPermission.java	Fri Aug 31 13:42:47 2012 -0700
@@ -467,7 +467,6 @@
      * @param action the action string
      * @return the action mask
      */
-    @SuppressWarnings("fallthrough")
     private static int getMask(String action) {
 
         if (action == null) {
@@ -480,7 +479,8 @@
 
         int mask = NONE;
 
-        // Check against use of constants (used heavily within the JDK)
+        // Use object identity comparison against known-interned strings for
+        // performance benefit (these values are used heavily within the JDK).
         if (action == SecurityConstants.SOCKET_RESOLVE_ACTION) {
             return RESOLVE;
         } else if (action == SecurityConstants.SOCKET_CONNECT_ACTION) {
@@ -568,7 +568,7 @@
                 switch(a[i-matchlen]) {
                 case ',':
                     seencomma = true;
-                    /*FALLTHROUGH*/
+                    break;
                 case ' ': case '\r': case '\n':
                 case '\f': case '\t':
                     break;
--- a/jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java	Fri Aug 31 13:42:47 2012 -0700
@@ -248,7 +248,7 @@
         return provider.newAsynchronousFileChannel(file, options, executor, attrs);
     }
 
-    @SuppressWarnings({ "unchecked", "rawtypes" }) // generic array construction
+    @SuppressWarnings({"unchecked", "rawtypes"}) // generic array construction
     private static final FileAttribute<?>[] NO_ATTRIBUTES = new FileAttribute[0];
 
     /**
--- a/jdk/src/share/classes/java/nio/channels/FileChannel.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/nio/channels/FileChannel.java	Fri Aug 31 13:42:47 2012 -0700
@@ -287,7 +287,7 @@
         return provider.newFileChannel(path, options, attrs);
     }
 
-    @SuppressWarnings({ "unchecked", "rawtypes" }) // generic array construction
+    @SuppressWarnings({"unchecked", "rawtypes"}) // generic array construction
     private static final FileAttribute<?>[] NO_ATTRIBUTES = new FileAttribute[0];
 
     /**
--- a/jdk/src/share/classes/java/util/ArrayDeque.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/ArrayDeque.java	Fri Aug 31 13:42:47 2012 -0700
@@ -121,6 +121,7 @@
      *
      * @param numElements  the number of elements to hold
      */
+    @SuppressWarnings("unchecked")
     private void allocateElements(int numElements) {
         int initialCapacity = MIN_INITIAL_CAPACITY;
         // Find the best power of two to hold elements.
@@ -152,10 +153,11 @@
         int newCapacity = n << 1;
         if (newCapacity < 0)
             throw new IllegalStateException("Sorry, deque too big");
-        Object[] a = new Object[newCapacity];
+        @SuppressWarnings("unchecked")
+        E[] a = (E[]) new Object[newCapacity];
         System.arraycopy(elements, p, a, 0, r);
         System.arraycopy(elements, 0, a, r, p);
-        elements = (E[])a;
+        elements = a;
         head = 0;
         tail = n;
     }
@@ -182,6 +184,7 @@
      * Constructs an empty array deque with an initial capacity
      * sufficient to hold 16 elements.
      */
+    @SuppressWarnings("unchecked")
     public ArrayDeque() {
         elements = (E[]) new Object[16];
     }
@@ -793,6 +796,7 @@
      *         this deque
      * @throws NullPointerException if the specified array is null
      */
+    @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
         int size = size();
         if (a.length < size)
--- a/jdk/src/share/classes/java/util/Arrays.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/Arrays.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -560,7 +560,7 @@
      * off is the offset to generate corresponding low, high in src
      * To be removed in a future release.
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     private static void mergeSort(Object[] src,
                                   Object[] dest,
                                   int low,
@@ -747,7 +747,7 @@
      * off is the offset into src corresponding to low in dest
      * To be removed in a future release.
      */
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     private static void mergeSort(Object[] src,
                                   Object[] dest,
                                   int low, int high, int off,
@@ -2832,6 +2832,7 @@
      * @return a list view of the specified array
      */
     @SafeVarargs
+    @SuppressWarnings("varargs")
     public static <T> List<T> asList(T... a) {
         return new ArrayList<>(a);
     }
--- a/jdk/src/share/classes/java/util/Collections.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/Collections.java	Fri Aug 31 13:42:47 2012 -0700
@@ -213,7 +213,7 @@
      * @throws IllegalArgumentException (optional) if the comparator is
      *         found to violate the {@link Comparator} contract
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public static <T> void sort(List<T> list, Comparator<? super T> c) {
         Object[] a = list.toArray();
         Arrays.sort(a, (Comparator)c);
@@ -418,7 +418,7 @@
      * @throws UnsupportedOperationException if the specified list or
      *         its list-iterator does not support the <tt>set</tt> operation.
      */
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public static void reverse(List<?> list) {
         int size = list.size();
         if (size < REVERSE_THRESHOLD || list instanceof RandomAccess) {
@@ -497,7 +497,7 @@
      * @throws UnsupportedOperationException if the specified list or its
      *         list-iterator does not support the <tt>set</tt> operation.
      */
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public static void shuffle(List<?> list, Random rnd) {
         int size = list.size();
         if (size < SHUFFLE_THRESHOLD || list instanceof RandomAccess) {
@@ -535,7 +535,7 @@
      *         || j &lt; 0 || j &gt;= list.size()).
      * @since 1.4
      */
-    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public static void swap(List<?> list, int i, int j) {
         // instead of using a raw type here, it's possible to capture
         // the wildcard but it will require a call to a supplementary
@@ -669,7 +669,7 @@
      * @throws NoSuchElementException if the collection is empty.
      * @see Comparable
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public static <T> T min(Collection<? extends T> coll, Comparator<? super T> comp) {
         if (comp==null)
             return (T)min((Collection) coll);
@@ -740,7 +740,7 @@
      * @throws NoSuchElementException if the collection is empty.
      * @see Comparable
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public static <T> T max(Collection<? extends T> coll, Comparator<? super T> comp) {
         if (comp==null)
             return (T)max((Collection) coll);
@@ -1403,7 +1403,7 @@
             extends UnmodifiableSet<Map.Entry<K,V>> {
             private static final long serialVersionUID = 7854390611657943733L;
 
-            @SuppressWarnings({ "unchecked", "rawtypes" })
+            @SuppressWarnings({"unchecked", "rawtypes"})
             UnmodifiableEntrySet(Set<? extends Map.Entry<? extends K, ? extends V>> s) {
                 // Need to cast to raw in order to work around a limitation in the type system
                 super((Set)s);
@@ -3172,7 +3172,7 @@
      *
      * @see #emptySet()
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public static final Set EMPTY_SET = new EmptySet<>();
 
     /**
@@ -3271,10 +3271,13 @@
             return new EmptySortedSet<>();
         }
 
-        public Comparator comparator() {
+        @Override
+        public Comparator<? super E> comparator() {
             return null;
         }
 
+        @Override
+        @SuppressWarnings("unchecked")
         public SortedSet<E> subSet(Object fromElement, Object toElement) {
             Objects.requireNonNull(fromElement);
             Objects.requireNonNull(toElement);
@@ -3294,6 +3297,7 @@
             return emptySortedSet();
         }
 
+        @Override
         public SortedSet<E> headSet(Object toElement) {
             Objects.requireNonNull(toElement);
 
@@ -3304,6 +3308,7 @@
             return emptySortedSet();
         }
 
+        @Override
         public SortedSet<E> tailSet(Object fromElement) {
             Objects.requireNonNull(fromElement);
 
@@ -3314,10 +3319,12 @@
             return emptySortedSet();
         }
 
+        @Override
         public E first() {
             throw new NoSuchElementException();
         }
 
+        @Override
         public E last() {
             throw new NoSuchElementException();
         }
@@ -3328,7 +3335,7 @@
      *
      * @see #emptyList()
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public static final List EMPTY_LIST = new EmptyList<>();
 
     /**
@@ -3402,7 +3409,7 @@
      * @see #emptyMap()
      * @since 1.3
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public static final Map EMPTY_MAP = new EmptyMap<>();
 
     /**
@@ -3685,6 +3692,7 @@
             return a;
         }
 
+        @SuppressWarnings("unchecked")
         public <T> T[] toArray(T[] a) {
             final int n = this.n;
             if (a.length < n) {
@@ -3731,6 +3739,7 @@
      *         the <tt>Comparable</tt> interface.
      * @see Comparable
      */
+    @SuppressWarnings("unchecked")
     public static <T> Comparator<T> reverseOrder() {
         return (Comparator<T>) ReverseComparator.REVERSE_ORDER;
     }
--- a/jdk/src/share/classes/java/util/ComparableTimSort.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/ComparableTimSort.java	Fri Aug 31 13:42:47 2012 -0700
@@ -208,7 +208,7 @@
      * @param start the index of the first element in the range that is
      *        not already known to be sorted ({@code lo <= start <= hi})
      */
-    @SuppressWarnings({ "fallthrough", "rawtypes", "unchecked" })
+    @SuppressWarnings({"fallthrough", "rawtypes", "unchecked"})
     private static void binarySort(Object[] a, int lo, int hi, int start) {
         assert lo <= start && start <= hi;
         if (start == lo)
@@ -277,7 +277,7 @@
      * @return  the length of the run beginning at the specified position in
      *          the specified array
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     private static int countRunAndMakeAscending(Object[] a, int lo, int hi) {
         assert lo < hi;
         int runHi = lo + 1;
@@ -612,7 +612,7 @@
      *        (must be aBase + aLen)
      * @param len2  length of second run to be merged (must be > 0)
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     private void mergeLo(int base1, int len1, int base2, int len2) {
         assert len1 > 0 && len2 > 0 && base1 + len1 == base2;
 
@@ -729,7 +729,7 @@
      *        (must be aBase + aLen)
      * @param len2  length of second run to be merged (must be > 0)
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings({"unchecked", "rawtypes"})
     private void mergeHi(int base1, int len1, int base2, int len2) {
         assert len1 > 0 && len2 > 0 && base1 + len1 == base2;
 
--- a/jdk/src/share/classes/java/util/HashMap.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/HashMap.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -230,7 +230,7 @@
 
         this.loadFactor = loadFactor;
         threshold = (int)Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
-        table = new Entry[capacity];
+        table = new Entry<?,?>[capacity];
         init();
     }
 
@@ -1078,7 +1078,7 @@
             capacity <<= 1;
         }
 
-        table = new Entry[capacity];
+        table = new Entry<?,?>[capacity];
         threshold = (int) Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
         init();  // Give subclass a chance to do its thing.
 
--- a/jdk/src/share/classes/java/util/JumboEnumSet.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/JumboEnumSet.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,6 +121,7 @@
             unseen = elements[0];
         }
 
+        @Override
         public boolean hasNext() {
             while (unseen == 0 && unseenIndex < elements.length - 1)
                 unseen = elements[++unseenIndex];
@@ -128,6 +129,7 @@
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public E next() {
             if (!hasNext())
                 throw new NoSuchElementException();
@@ -138,6 +140,7 @@
                                 + Long.numberOfTrailingZeros(lastReturned)];
         }
 
+        @Override
         public void remove() {
             if (lastReturned == 0)
                 throw new IllegalStateException();
--- a/jdk/src/share/classes/java/util/PriorityQueue.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/PriorityQueue.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -330,6 +330,7 @@
         return true;
     }
 
+    @SuppressWarnings("unchecked")
     public E peek() {
         if (size == 0)
             return null;
--- a/jdk/src/share/classes/java/util/PropertyPermission.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/PropertyPermission.java	Fri Aug 31 13:42:47 2012 -0700
@@ -246,7 +246,8 @@
             return mask;
         }
 
-        // Check against use of constants (used heavily within the JDK)
+        // Use object identity comparison against known-interned strings for
+        // performance benefit (these values are used heavily within the JDK).
         if (actions == SecurityConstants.PROPERTY_READ_ACTION) {
             return READ;
         } if (actions == SecurityConstants.PROPERTY_WRITE_ACTION) {
--- a/jdk/src/share/classes/java/util/PropertyResourceBundle.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/PropertyResourceBundle.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,6 +125,7 @@
      * @throws IOException if an I/O error occurs
      * @throws NullPointerException if <code>stream</code> is null
      */
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public PropertyResourceBundle (InputStream stream) throws IOException {
         Properties properties = new Properties();
         properties.load(stream);
@@ -143,6 +144,7 @@
      * @throws NullPointerException if <code>reader</code> is null
      * @since 1.6
      */
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public PropertyResourceBundle (Reader reader) throws IOException {
         Properties properties = new Properties();
         properties.load(reader);
--- a/jdk/src/share/classes/java/util/jar/JarVerifier.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -325,6 +325,7 @@
      * the given file in the jar.
      * @deprecated
      */
+    @Deprecated
     public java.security.cert.Certificate[] getCerts(String name)
     {
         return mapSignersToCertArray(getCodeSigners(name));
--- a/jdk/src/share/classes/java/util/jar/Pack200.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/java/util/jar/Pack200.java	Fri Aug 31 13:42:47 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003,2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003,2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -726,13 +726,13 @@
     private static final String PACK_PROVIDER = "java.util.jar.Pack200.Packer";
     private static final String UNPACK_PROVIDER = "java.util.jar.Pack200.Unpacker";
 
-    private static Class packerImpl;
-    private static Class unpackerImpl;
+    private static Class<?> packerImpl;
+    private static Class<?> unpackerImpl;
 
     private synchronized static Object newInstance(String prop) {
         String implName = "(unknown)";
         try {
-            Class impl = (PACK_PROVIDER.equals(prop))? packerImpl: unpackerImpl;
+            Class<?> impl = (PACK_PROVIDER.equals(prop))? packerImpl: unpackerImpl;
             if (impl == null) {
                 // The first time, we must decide which class to use.
                 implName = java.security.AccessController.doPrivileged(
--- a/jdk/src/share/classes/sun/util/PreHashedMap.java	Tue Sep 11 19:58:36 2012 +0400
+++ b/jdk/src/share/classes/sun/util/PreHashedMap.java	Fri Aug 31 13:42:47 2012 -0700
@@ -126,7 +126,7 @@
      */
     protected abstract void init(Object[] ht);
 
-    // @SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked")
     private V toV(Object x) {
         return (V)x;
     }
@@ -259,8 +259,7 @@
                                     return true;
                                 if (!(ob instanceof Map.Entry))
                                     return false;
-                                Map.Entry<String,V> that
-                                    = (Map.Entry<String,V>)ob;
+                                Map.Entry<?,?> that = (Map.Entry<?,?>)ob;
                                 return ((this.getKey() == null
                                          ? that.getKey() == null
                                          : this.getKey()