Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8033616

Fix serial lint warnings in javax.imageio.*

    Details

    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add missing serialVersionUID fields in javax.imageio.

      Problem

      Various serializable types in javax.imageio.* neglect to define serialVersionUID fields; this should be rectified.

      Solution

      Add the serialVersionUID fields to the affected types.

      Specification

      Note that the values added match on JDK 6 and JDK 8.
      
      --- old/src/share/classes/javax/imageio/IIOException.java   2014-02-04 16:24:18.000000000 -0800
      +++ new/src/share/classes/javax/imageio/IIOException.java   2014-02-04 16:24:18.000000000 -0800
      @@ -40,6 +40,7 @@
        *
        */
       public class IIOException extends IOException {
      +    private static final long serialVersionUID = -3216210718638985251L;
      
           /**
            * Constructs an <code>IIOException</code> with a given message
      --- old/src/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java   2014-02-04 16:24:19.000000000 -0800
      @@ -44,6 +44,7 @@
        *
        */
       public class IIOInvalidTreeException extends IIOException {
      +    private static final long serialVersionUID = -1314083172544132777L;
      
           /**
            * The <code>Node</code> that led to the parsing error, or
      --- old/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java   2014-02-04 16:24:19.000000000 -0800
      +++ new/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java   2014-02-04 16:24:19.000000000 -0800
      @@ -41,6 +41,7 @@
      
      
       class IIODOMException extends DOMException {
      +    private static final long serialVersionUID = -4369510142067447468L;
      
           public IIODOMException(short code, String message) {
               super(code, message);
      --- old/src/share/classes/javax/imageio/spi/DigraphNode.java    2014-02-04 16:24:20.000000000 -0800
      +++ new/src/share/classes/javax/imageio/spi/DigraphNode.java    2014-02-04 16:24:20.000000000 -0800
      @@ -40,6 +40,7 @@
        *
        */
       class DigraphNode implements Cloneable, Serializable {
      +    private static final long serialVersionUID = 5308261378582246841L;
      
           /** The data associated with this node. */
           protected Object data;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
                Reviewed By:
                Alan Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: