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

Fix serial lint warnings in javax.sound

XMLWordPrintable

    • minimal
    • Java API
    • SE

      Summary

      Add missing serialVersionUID fields in javax.sound.

      Problem

      Various serializable classes in javax.sound.* don't define serialVersionUID fields.

      Solution

      Add the serialVersionUID fields with the appropriate values to the affected classes.

      Specification

      --- a/src/share/classes/javax/sound/midi/InvalidMidiDataException.java  Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/midi/InvalidMidiDataException.java  Sun Feb 09 12:51:56 2014 -0800
      @@ -39,6 +39,7 @@
        * @author Kara Kytle
        */
       public class InvalidMidiDataException extends Exception {
      +    private static final long serialVersionUID = 2780771756789932067L;
      
           /**
            * Constructs an <code>InvalidMidiDataException</code> with
      
      diff -r 3636be9c08a9 src/share/classes/javax/sound/midi/MidiUnavailableException.java
      --- a/src/share/classes/javax/sound/midi/MidiUnavailableException.java  Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/midi/MidiUnavailableException.java  Sun Feb 09 12:51:56 2014 -0800
      @@ -39,6 +39,7 @@
        * @author Kara Kytle
        */
       public class MidiUnavailableException extends Exception {
      +    private static final long serialVersionUID = 6093809578628944323L;
      
           /**
            * Constructs a <code>MidiUnavailableException</code> that has
      
      diff -r 3636be9c08a9 src/share/classes/javax/sound/sampled/AudioPermission.java
      --- a/src/share/classes/javax/sound/sampled/AudioPermission.java        Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/sampled/AudioPermission.java        Sun Feb 09 12:51:56 2014 -0800
      @@ -27,7 +27,6 @@
      
       public class AudioPermission extends BasicPermission {
      +    private static final long serialVersionUID = -5518053473477801126L;
      
           /**
            * Creates a new <code>AudioPermission</code> object that has the specified
      
      diff -r 3636be9c08a9 src/share/classes/javax/sound/sampled/LineEvent.java
      --- a/src/share/classes/javax/sound/sampled/LineEvent.java      Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/sampled/LineEvent.java      Sun Feb 09 12:51:56 2014 -0800
      @@ -46,6 +46,7 @@
        * @serial exclude
        */
       public class LineEvent extends java.util.EventObject {
      +    private static final long serialVersionUID = -1274246333383880410L;
      
           // INSTANCE VARIABLES
      
      diff -r 3636be9c08a9 src/share/classes/javax/sound/sampled/LineUnavailableException.java
      --- a/src/share/classes/javax/sound/sampled/LineUnavailableException.java       Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/sampled/LineUnavailableException.java       Sun Feb 09 12:51:56 2014 -0800
      @@ -44,6 +44,7 @@
        */
      
       public class LineUnavailableException extends Exception {
      +    private static final long serialVersionUID = -2046718279487432130L;
      
           /**
            * Constructs a <code>LineUnavailableException</code> that has
      
      diff -r 3636be9c08a9 src/share/classes/javax/sound/sampled/UnsupportedAudioFileException.java
      --- a/src/share/classes/javax/sound/sampled/UnsupportedAudioFileException.java  Thu Feb 06 10:30:18 2014 -0800
      +++ b/src/share/classes/javax/sound/sampled/UnsupportedAudioFileException.java  Sun Feb 09 12:51:56 2014 -0800
      @@ -33,15 +33,8 @@
        * @author Kara Kytle
        * @since 1.3
        */
       public class UnsupportedAudioFileException extends Exception {
      +    private static final long serialVersionUID = -139127412623160368L;
      
           /**
            * Constructs a <code>UnsupportedAudioFileException</code> that has

            darcy Joe Darcy
            darcy Joe Darcy
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: