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

AudioInputStream.close() not releasing resources hook

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u76
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Tested it in windows 7, 8, 8.1.

      A DESCRIPTION OF THE PROBLEM :
      trying to convert *.wav audio file to specific *.wav file.

      try (AudioInputStream sias = AudioSystem.getAudioInputStream(mediaFileToConvert)) {

      AudioFormat newFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000f, 16, 1, 2, 8000f, false);
      AudioInputStream convert1AIS = AudioSystem.getAudioInputStream(newFormat, sias);

      AudioSystem.write(convert1AIS, AudioFileFormat.Type.WAVE, saveConvertedFilelocalDest);

      convert1AIS.close();
      }

      while trying to delete mediaFileToConvert giving no error but not deleting file. even unable to delete manually


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      System.gc();

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pardesha Pardeep Sharma
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: