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

Incorrect behaviour of AudioSystem.getTargetFormats/getTargetEncodings/isConversionSupported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • client-libs
    • None
    • b105
    • generic
    • generic

      Behavior of AudioSystem.getTargetFormats/getTargetEncodings/isConversionSupported contradicts each other.

      The problem comes from the AudioSystem.getAudioInputStream and the code below:
              if (sourceStream.getFormat().matches(targetFormat)) {
                  return sourceStream;
              }
      Note that getTargetFormats/getTargetEncodings/isConversionSupported does not take into account that getAudioInputStream do not throw an expection in this case even for some custom AudioStream which is not supported by the converters.

            serb Sergey Bylokhov
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: