Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8158479

[macosx] The use of some elements of javax.sound.midi produces a deprecation warning on OS X.

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.8.0_92"
      Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      OS X version 10.11.4 (15E65)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      standard MacBook Pro (17-inch, Mid 2009)

      A DESCRIPTION OF THE PROBLEM :
      A call to (e.g.) javax.sound.midi.MidiSystem.getSequencer() produces a deprecation warning, requesting that the calling code be changed to use the APIs in AudioComponent.h in place of the deprecated Carbon Component Manager for hosting Audio Units. (The warning appears, of course, in the console and does not affect any GUI aspects of the program.)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      call some method of javax.sound.midi, for instance MidiSystem.getSequencer()

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The program acquires a Sequencer.
      ACTUAL -
      The program runs as above, with a warning message similar to the following:


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      2016-05-13 14:46:23.562 java[19560:1354557] 14:46:23.562 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.sound.midi.*;

      public class MusicTest1 {

      public void play() {
      try {
      Sequencer sequencer = MidiSystem.getSequencer();
                              System.out.println("I got a sequencer!");
      } catch (MidiUnavailableException ex) { }
      }

      public static void main(String[] args) {
      MusicTest1 mt = new MusicTest1();
      mt.play();
      }
      }

      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: