United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4925483 : RFE: equals() should compare string in Encoding and Type

Details
Type:
Enhancement
Submit Date:
2003-09-19
Status:
Resolved
Updated Date:
2003-10-13
Project Name:
JDK
Resolved Date:
2003-10-13
Component:
client-libs
OS:
generic
Sub-Component:
javax.sound
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (b24)

Related Reports
Relates:
Relates:

Sub Tasks

Description

Name: fb126949			Date: 09/19/2003


The classes AudioFormat.Encoding and AudioFileFormat.Type both compare the instance equality in the equals() method. However, this prevents 3rd-party vendors to publish a plug-in with a new encoding/type, since only one instance of it would be accepted.

The problem is this: when a user wants to convert an audiostream to a format that is offered by an installed plug-in (e.g. mp3 encoder), he uses the method AudioSystem.getAudioInputStream(AudioFormat, AudioInputStream) for conversion. He needs to provide an AudioFormat instance with the mp3 encoding. The only way to do that is to instanciate an own instance of AudioFormat.Encoding. But due to the implementation of equals(), Java Sound will not do the conversion, since the Encoding instance is difeerent from the one provided by the plug-in, even if they have the same name.

Encodings and Types are fully specified by their name, and not their instance.

The deficiency of the current implementation lead Tritonus, an independent group that publishes Java Sound plug-ins, to establish a quasi-standard repository which makes sure that only unique instances of Encoding and Type are used in the plug-ins and from the user. Such a repository contradicts Java Sound's idea of being open for new plug-ins.


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

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b24
tiger-beta


                                     
2004-06-14
PUBLIC COMMENTS

equals() should compare string in Encoding and Type
                                     
2004-06-10
EVALUATION


###@###.### 2003-09-19
	Very important to get this fixed in tiger.
                                     
2003-09-19



Hardware and Software, Engineered to Work Together