United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4791152 : SPEC: description of isRunning(), isActive() is incomplete

Details
Type:
Bug
Submit Date:
2002-12-10
Status:
Closed
Updated Date:
2005-05-30
Project Name:
JDK
Resolved Date:
2005-01-22
Component:
client-libs
OS:
generic
Sub-Component:
javax.sound
CPU:
generic
Priority:
P4
Resolution:
Future Project
Affected Versions:
1.4.2
Fixed Versions:

Related Reports
Relates:
Relates:

Sub Tasks

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



Hardware and Software, Engineered to Work Together