Skip to content

Commit

Permalink
JDK 7 syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
albertus82 committed Mar 27, 2024
1 parent 5276d6b commit c01120c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ private static void setText(final Widget widget, final ISupplier<String> textSup
try {
setTextMethods.get(widget.getClass()).invoke(widget, String.valueOf(textSupplier.get()));
}
catch (final IllegalAccessException e) {
throw new IllegalStateException(e);
}
catch (final InvocationTargetException e) {
catch (final IllegalAccessException | InvocationTargetException e) {
throw new IllegalStateException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ public void createPage() {
try {
page = pageClass.getDeclaredConstructor().newInstance();
}
catch (final InstantiationException e) {
throw new IllegalStateException(e);
}
catch (final IllegalAccessException e) {
throw new IllegalStateException(e);
}
catch (final InvocationTargetException e) {
throw new IllegalStateException(e);
}
catch (final NoSuchMethodException e) {
catch (final InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
throw new IllegalStateException(e);
}
}
Expand Down

0 comments on commit c01120c

Please sign in to comment.