JDK 8 Warnings Cleanup Day -- Dec. 1st, 2011

Weijun Wang weijun.wang at oracle.com
Wed Nov 30 01:32:17 PST 2011


On 11/29/2011 10:10 AM, Xiomara Jayasena wrote:
> 6.       In order to streamlines the process, Stuart Marks will be consolidating patches and running build and test jobs - thanks to Stuart for doing this!

I cd into several security-related directories, call make clobber, and 
then call make. Only one warning in javax/security, others are inside 
sun/misc. The fix is trivial so I won't create a CR or a webrev.

Thanks
Max


diff --git 
a/src/share/classes/javax/security/auth/kerberos/ServicePermission.java 
b/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
--- a/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
+++ b/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
@@ -301,7 +301,7 @@
       * @param action the action string
       * @return the action mask
       */
-
+    @SuppressWarnings("fallthrough")
      private static int getMask(String action) {

          if (action == null) {
diff --git a/src/share/classes/sun/misc/BASE64Decoder.java 
b/src/share/classes/sun/misc/BASE64Decoder.java
--- a/src/share/classes/sun/misc/BASE64Decoder.java
+++ b/src/share/classes/sun/misc/BASE64Decoder.java
@@ -102,6 +102,7 @@
      /**
       * Decode one BASE64 atom into 1, 2, or 3 bytes of data.
       */
+    @SuppressWarnings({"fallthrough"})
      protected void decodeAtom(PushbackInputStream inStream, 
OutputStream outStream, int rem)
          throws java.io.IOException
      {
diff --git a/src/share/classes/sun/misc/CEFormatException.java 
b/src/share/classes/sun/misc/CEFormatException.java
--- a/src/share/classes/sun/misc/CEFormatException.java
+++ b/src/share/classes/sun/misc/CEFormatException.java
@@ -28,7 +28,9 @@
  import java.io.IOException;

  public class CEFormatException extends IOException {
-        public CEFormatException(String s) {
-                super(s);
-        }
+    static final long serialVersionUID = -7139121221067081482L;
+    public CEFormatException(String s) {
+        super(s);
+    }
  }
+
diff --git a/src/share/classes/sun/misc/CEStreamExhausted.java 
b/src/share/classes/sun/misc/CEStreamExhausted.java
--- a/src/share/classes/sun/misc/CEStreamExhausted.java
+++ b/src/share/classes/sun/misc/CEStreamExhausted.java
@@ -27,4 +27,7 @@
  import java.io.IOException;

  /** This exception is thrown when EOF is reached */
-public class CEStreamExhausted extends IOException { };
+public class CEStreamExhausted extends IOException {
+    static final long serialVersionUID = -5889118049525891904L;
+}
+


More information about the jdk8-dev mailing list