Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4934462
Votes 0
Synopsis SPEC: Document that Clip.open() throws IAE
Category java:classes_sound
Reported Against tiger
Release Fixed 1.5(tiger-b26)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4679187 , 4940271
Submit Date 08-OCT-2003
Description
Document that Clip.open() throws IAE




When calling the open() method without parameters (inherited from interface Line) in an instance of Clip, an IllegalArgumentException is thrown. This behavior has always existed. 

However, javadoc of Line.open() states: 
  This method takes no arguments, and opens the 
  line with the current settings.  For 
  SourceDataLine and TargetDataLine objects, this 
  means that the line is opened with default 
  settings.  For a Clip, however, the buffer size 
  is determined when data is loaded.  Since this 
  method does not allow the application to specify 
  any data to load, it allocates resources for a 
  clip with zero frames of data, and there is no 
  means for subsequently loading data into that 
  clip. Therefore, you should instead use one of 
  the open methods provided in the Clip interface 
  to load data into the Clip.

This is not useful and it was never implemented like that. Therefore the text above should be changed to specify explicitely that IAE is thrown if Clip.open() is called.


======================================================================
 xxxxx@xxxxx  2003-10-22
checked in bug fix
Work Around
N/A
Evaluation
 xxxxx@xxxxx  2003-10-09
	Easy to fix in the javadoc. No implementation changes necessary.
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang