changeset 5590:b2fc66012451

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>
author smarks
date Mon, 02 Jul 2012 14:11:44 -0700
parents ecc5dd3790a1
children d375ea39ce9c
files src/share/classes/java/util/InvalidPropertiesFormatException.java src/share/classes/java/util/regex/Pattern.java src/share/classes/java/util/zip/GZIPInputStream.java
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/InvalidPropertiesFormatException.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/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/src/share/classes/java/util/regex/Pattern.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/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/src/share/classes/java/util/zip/GZIPInputStream.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/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;
     }
 
     /*