Hello,

Please review the patch below to address

    JDK-8033526: Fix serial lint warnings in java.awt.*
    http://cr.openjdk.java.net/~darcy/8033526.0/

The patch just adds serialVersionUID values to various serializable classes that have long been in java.awt.*. I've verified the serialver computation matched on both JDK 6 and JDK 8.

Thanks,

-Joe

--- old/src/share/classes/java/awt/color/CMMException.java 2014-02-03 21:21:08.000000000 -0800 +++ new/src/share/classes/java/awt/color/CMMException.java 2014-02-03 21:21:08.000000000 -0800
@@ -47,6 +47,7 @@
  */

 public class CMMException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 5775558044142994965L;

     /**
      *  Constructs a CMMException with the specified detail message.
--- old/src/share/classes/java/awt/color/ProfileDataException.java 2014-02-03 21:21:09.000000000 -0800 +++ new/src/share/classes/java/awt/color/ProfileDataException.java 2014-02-03 21:21:09.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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,6 +31,7 @@
  */

 public class ProfileDataException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 7286140888240322498L;

     /**
* Constructs a ProfileDataException with the specified detail message. --- old/src/share/classes/java/awt/datatransfer/FlavorEvent.java 2014-02-03 21:21:10.000000000 -0800 +++ new/src/share/classes/java/awt/datatransfer/FlavorEvent.java 2014-02-03 21:21:10.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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
@@ -38,6 +38,8 @@
  * @since 1.5
  */
 public class FlavorEvent extends EventObject {
+    private static final long serialVersionUID = -5842664112252414548L;
+
     /**
      * Constructs a <code>FlavorEvent</code> object.
      *
--- old/src/share/classes/java/awt/geom/IllegalPathStateException.java 2014-02-03 21:21:11.000000000 -0800 +++ new/src/share/classes/java/awt/geom/IllegalPathStateException.java 2014-02-03 21:21:10.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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
@@ -35,6 +35,8 @@
  */

 public class IllegalPathStateException extends RuntimeException {
+    private static final long serialVersionUID = -5158084205220481094L;
+
     /**
      * Constructs an <code>IllegalPathStateException</code> with no
      * detail message.
--- old/src/share/classes/java/awt/geom/NoninvertibleTransformException.java 2014-02-03 21:21:11.000000000 -0800 +++ new/src/share/classes/java/awt/geom/NoninvertibleTransformException.java 2014-02-03 21:21:11.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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
@@ -33,6 +33,8 @@
  */

 public class NoninvertibleTransformException extends java.lang.Exception {
+    private static final long serialVersionUID = 6137225240503990466L;
+
     /**
      * Constructs an instance of
      * <code>NoninvertibleTransformException</code>
--- old/src/share/classes/java/awt/image/ImagingOpException.java 2014-02-03 21:21:12.000000000 -0800 +++ new/src/share/classes/java/awt/image/ImagingOpException.java 2014-02-03 21:21:12.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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
@@ -32,6 +32,7 @@
  * process the image.
  */
 public class ImagingOpException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 8026288481846276658L;

     /**
      * Constructs an <code>ImagingOpException</code> object with the
--- old/src/share/classes/java/awt/image/RasterFormatException.java 2014-02-03 21:21:13.000000000 -0800 +++ new/src/share/classes/java/awt/image/RasterFormatException.java 2014-02-03 21:21:13.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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,6 +31,7 @@
  * invalid layout information in the {@link Raster}.
  */
 public class RasterFormatException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 96598996116164315L;

     /**
      * Constructs a new <code>RasterFormatException</code> with the
--- old/src/share/classes/java/awt/image/renderable/ParameterBlock.java 2014-02-03 21:21:13.000000000 -0800 +++ new/src/share/classes/java/awt/image/renderable/ParameterBlock.java 2014-02-03 21:21:13.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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
@@ -93,6 +93,8 @@
  * </pre>
  * */
 public class ParameterBlock implements Cloneable, Serializable {
+    private static final long serialVersionUID = -7577115551785240750L;
+
     /** A Vector of sources, stored as arbitrary Objects. */
     protected Vector<Object> sources = new Vector<Object>();

--- old/src/share/classes/java/awt/print/PrinterAbortException.java 2014-02-03 21:21:14.000000000 -0800 +++ new/src/share/classes/java/awt/print/PrinterAbortException.java 2014-02-03 21:21:14.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -33,6 +33,7 @@
  */

 public class PrinterAbortException extends PrinterException {
+    private static final long serialVersionUID = 4725169026278854136L;

     /**
      * Constructs a new <code>PrinterAbortException</code> with no
--- old/src/share/classes/java/awt/print/PrinterException.java 2014-02-03 21:21:15.000000000 -0800 +++ new/src/share/classes/java/awt/print/PrinterException.java 2014-02-03 21:21:15.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -32,6 +32,7 @@
  */

 public class PrinterException extends Exception {
+    private static final long serialVersionUID = -3757589981158265819L;

     /**
      * Constructs a new <code>PrinterException</code> object

Reply via email to