JDK-4791152 : SPEC: description of isRunning(), isActive() 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 :  
Relates :  
Description

Name: dkR10031			Date: 12/09/2002



The J2SE 1.4 API spec reads:

  "javax.sound.sampled
   Interface DataLine

   public boolean isRunning()

   Indicates whether the line is running. The default is false. An open line 
   begins running when the first data is presented in response to an 
   invocation of the start method, and continues until presentation ceases 
   in response to a call to stop or because playback completes."

The description is incomplete since the specification 
does not specify behavior of the method if data is not presented.

Also description is ambiguous because specification does not
define where, when, how, and which "the first data" should be presented in 
response to an invocation of the start method for switching line to 
a running state. 

As well, the specification is unclear about what the distinction of 
the methods isRunning and isActive is.

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

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

EVALUATION ###@###.### 2002-12-10 Indeed I guess nobody ever knew how the method are really distinguished. As much as I see it (and unfortunately, from the implementation), a line is active in between calls to start() and stop(). In that sense, active means that the line is ready to take or give data. Running is tightly bound to data flow in the line. I.e. when you start a SourceDataLine but never write data to it, the line should not be running. This also means that a line should become not running on buffer underrun/overflow. Since this is a change that must also be verified in the implementation, committing to Tiger. ###@###.### 2003-10-09 See also 4297981: it requested to rename isRunning to isStarted, but was not approved by CCC. Thinking of isRunning as equivalent to isStarted makes sense. But it is not obvious why START and STOP events should then be bound to isActive. Therefore I postpone this bug once again. It needs more discussion. Do we need ACTIVE/INACTIVE events? Should we consider an isStarted() method for mustang? How about notification of underruns/overflows?
2004-06-11

PUBLIC COMMENTS description of isRunning(), isActive() is incomplete
2004-06-10