RFR: 8284672: Collapse identical catch branches in java.desktop [v2]
Sergey Bylokhov
serb at openjdk.java.net
Thu Jun 16 04:01:15 UTC 2022
On Wed, 1 Jun 2022 20:50:42 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> src/java.desktop/share/classes/com/sun/media/sound/SF2SoundbankReader.java line 50:
>>
>>> 48: try {
>>> 49: return new SF2Soundbank(url);
>>> 50: } catch (IOException e) {
>>
>> same here
>
> Yeah. I think it makes sense to amend behavior here and not catch IOException. Callers should be ready for it.
This getSoundbank method is called when we iterate over providers and check which can be used, unfortunately, that code is not ready for the IOException and we return "null" -> the next provider will be checked. This is a kind of compatibility quirk.
-------------
PR: https://git.openjdk.org/jdk/pull/8154
More information about the client-libs-dev
mailing list