RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

Sergey Bylokhov serb at openjdk.org
Thu Jun 12 22:50:40 UTC 2025


On Thu, 12 Jun 2025 22:34:51 GMT, Phil Race <prr at openjdk.org> wrote:

>> test/jdk/javax/sound/sampled/Clip/AudioContentHandlers.java line 51:
>> 
>>> 49:  * @run main/othervm -Xmx128m AudioContentHandlers
>>> 50:  */
>>> 51: public final class AudioContentHandlers {
>> 
>> I see the src/java.desktop/share/classes/sun/awt/www/content/audio/ are not updated, so what will be the replacement of AudioClip? I guess we should return SoundClip now?
>
> I looked into this when I was doing SoundClip.
> What is actually returned by contract is a ContentHandler which returns an Object from its getContent() method
> That Object happens to be a com.sun.media.sound.JavaSoundAudioClip which previously implemented AudioClip
> 
> This implements relationship isn't there for SoundClip, so the expectation of the test that it knows of an exported type that will actually be returned is no longer valid.
> 
> I don't think it is worth testing  that JavaSoundAudioClip is returned.
> 
> Possibly we could jsut verify that a non-null handler is returned ?

As far as I understand, this method should return something that the application can actually use. Previously, the application could access the audio data via the AudioClip interface - it wasn’t important that it was specifically implemented by JavaSoundAudioClip. Now, I believe we should return a SoundClip object, which can be created (not necessarily via the public API of the SoundClip/JavaSoundAudioClip classes).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25698#discussion_r2143777885


More information about the client-libs-dev mailing list