On Mon, 28 Sep 2026 16:11:07 GMT, Sergey Bylokhov <[email protected]> wrote:

>> Phil Race has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8385017
>
> src/java.desktop/share/classes/com/sun/media/sound/SoftVoice.java line 624:
> 
>> 622:                     osc_stream = resampler;
>> 623:                 } catch (IOException e) {
>> 624:                     osc_stream = null;
> 
> Seem in this particular case the osc_stream should be checked for null and if 
> not then "osc_stream.close()" should be called? IOException may occur in 
> resampler.open() and we need to close the old one? Or possibly we should 
> close the old one first then try to open the new one?

On reflection I don't think I need to do this at all.
osc_stream will always be null when we reach here because 'stopping' will null 
it out. 
And if it were true,  'started' is set to false at the end of this method.
And it can't be set back to true again until it has been stopped.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31299#discussion_r4127673862

Reply via email to