RFR: 8284672: Collapse identical catch branches in java.desktop [v2]

Sergey Bylokhov serb at openjdk.java.net
Thu Jun 16 04:01:12 UTC 2022


On Wed, 1 Jun 2022 20:55:30 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

>> Let's take advantage of Java 7 language feature - "Catching Multiple Exception Types".
>> It simplifies code. Reduces duplication.
>> Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' statement
>
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8284672: Collapse identical catch branches in java.desktop
>   fix formatting

src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java line 120:

> 118:             try {
> 119:                 INSTANCE = new Metacity(themeName);
> 120:             } catch (FileNotFoundException ex) {

Is it possible that the FileNotFoundException was ignored intentionally? After this change, it will be traced.

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

PR: https://git.openjdk.org/jdk/pull/8154



More information about the client-libs-dev mailing list