7176907: additional warnings cleanup in java.util, java.util.regexp, java.util.zip
authorsmarks
Mon, 02 Jul 2012 14:11:44 -0700
changeset 13158 f628cbfcbfa0
parent 13157 2141a68fb2a7
child 13159 b2bf5f74dd06
7176907: additional warnings cleanup in java.util, java.util.regexp, java.util.zip Reviewed-by: forax, khazra, smarks Contributed-by: Mani Sarkar <sadhak001@gmail.com>
jdk/src/share/classes/java/util/InvalidPropertiesFormatException.java
jdk/src/share/classes/java/util/regex/Pattern.java
jdk/src/share/classes/java/util/zip/GZIPInputStream.java
--- a/jdk/src/share/classes/java/util/InvalidPropertiesFormatException.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/jdk/src/share/classes/java/util/InvalidPropertiesFormatException.java	Mon Jul 02 14:11:44 2012 -0700
@@ -44,6 +44,9 @@
  */
 
 public class InvalidPropertiesFormatException extends IOException {
+
+    private static final long serialVersionUID = 7763056076009360219L;
+
     /**
      * Constructs an InvalidPropertiesFormatException with the specified
      * cause.
--- a/jdk/src/share/classes/java/util/regex/Pattern.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/jdk/src/share/classes/java/util/regex/Pattern.java	Mon Jul 02 14:11:44 2012 -0700
@@ -2026,6 +2026,7 @@
         }
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parsing of sequences between alternations.
      */
@@ -2140,6 +2141,7 @@
         return head;
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parse and add a new Single or Slice.
      */
@@ -2978,6 +2980,7 @@
         return head;
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parses inlined match flags and set them appropriately.
      */
@@ -3019,6 +3022,7 @@
         }
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parses the second part of inlined match flags and turns off
      * flags appropriately.
--- a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java	Mon Jul 02 14:11:44 2012 -0700
@@ -252,7 +252,7 @@
      */
     private int readUShort(InputStream in) throws IOException {
         int b = readUByte(in);
-        return ((int)readUByte(in) << 8) | b;
+        return (readUByte(in) << 8) | b;
     }
 
     /*