RFR: 8284567: Collapse identical catch branches in java.base
Bradford Wetmore
wetmore at openjdk.java.net
Fri Apr 8 18:44:53 UTC 2022
On Sat, 2 Apr 2022 16:05:06 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
src/java.base/share/classes/java/net/URI.java line 47:
> 45: import sun.nio.cs.UTF_8;
> 46:
> 47: import java.lang.Character; // for javadoc
Looks like the javadoc comment no longer applies, so should be ok to remove.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8081
More information about the core-libs-dev
mailing list