JDK-4791234 : SPEC: description of events and methods switching state is incomplete
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Future Project
  • OS: generic
  • CPU: generic
  • Submitted: 2002-12-10
  • Updated: 2005-05-30
  • Resolved: 2005-01-22
Related Reports
Relates :  
Description

Name: dkR10031			Date: 12/10/2002



The J2SE 1.4 API specification proposes the following events for detecting 
a dataline state switching: OPEN, CLOSE, START, STOP. Also 
specification proposes the following methods for the dataline state 
switching: open(), close(),start(), stop(). As well, dataline state 
can be switched if write() or read() methods has been called. 

However, the description is incomplete since the specification does not 
specify which methods are synchronous and which are not synchronous and 
this ambiguity makes difficult to interpret received events and results of
the dataline state checking methods( isActive(), isRunning(), isOpen()).
If this depends on an implementation then all such cases should be 
described in specification. 

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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: dragon
14-06-2004

EVALUATION ###@###.### 2002-12-10 In my opinion, the reason why this is not specified is because an implementation is free to use synchronous or asynchronous event dispatching, synchronous or asynchrous execution of open(), start(), stop(), close(). Also the existence of the mechanism is an indicator that the methods are allowe3d to execute asynchronously. I don't see any reason to force implementations to use one or the other model. So the specification of open(), start(), stop(), close() should be amended with an explanation that the methods are either blocking or not, depending on the implementation, and the spec of OPEN, START, STOP, CLOSE events should be amended that they may come during the corresponding method call or shortly after. STOP may also be sent without a corresponding action from the user program, since a Clip object will send this upon completion of playback.
11-06-2004

PUBLIC COMMENTS description of events and methods switching state is incomplete
10-06-2004