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
------------- Commit messages: - [PATCH] Collapse identical catch branches in java.desktop Changes: https://git.openjdk.java.net/jdk/pull/8154/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8154&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284672 Stats: 300 lines in 45 files changed: 2 ins; 170 del; 128 mod Patch: https://git.openjdk.java.net/jdk/pull/8154.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8154/head:pull/8154 PR: https://git.openjdk.java.net/jdk/pull/8154