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

SPEC: unspecified ArrayIndexOutOfBoundsException

    Details

      Description



      Name: dkR10031 Date: 12/26/2002



      The current reference implementation (JDK 1.4.2beta, build b11)
      of the javax.sound.sampled.Mixer.getTargetLineInfo(Line.Info info)
      throws unspecified ArrayIndexOutOfBoundsException. This behavior
      seems quite reasonable but is not specified:
      ------------------ example code begin --------------------------
      import javax.sound.sampled.Mixer;
      import javax.sound.sampled.Line;
      import javax.sound.sampled.AudioSystem;
      import javax.sound.sampled.TargetDataLine;

      public class MyTargetDataLine{
          public static void main(String args[]){
              try {
                  Mixer.Info[] mixers;
                  mixers = AudioSystem.getMixerInfo();
                  Mixer myMixer = AudioSystem.getMixer(mixers[0]);
                  myMixer.open();
                  Line.Info[] infos = myMixer.getTargetLineInfo();
                  System.out.println("Length is: " + infos.length);
                  TargetDataLine tdl = (TargetDataLine)myMixer.getLine(infos[0]);
                  myMixer.close();
              } catch (Exception e){
                  System.out.println("Exception: " + e);
              }
          }
      }
      ------------------ example code end ----------------------------
      ------------------ log begin -----------------------------------
      bash-2.03$ uname -a
      SunOS novo101 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-1
      bash-2.03$
      /export/ld25/java/dest/jdk1.4.2-b11/solaris-sparc/bin/java -showversion MyTargetDataLine
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b11)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b11, mixed mode)

      Length is: 0
      Exception: java.lang.ArrayIndexOutOfBoundsException: 0
      ------------------ log end -------------------------------------

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dimasunw Dima Dima (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: