Skip to content

Commit

Permalink
Remove unnecessary cast and unused local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rhowe committed Feb 2, 2022
1 parent 8230aec commit 775d096
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ private Set<String> getNamesFromQueryParams(final Map<String, Collection<String>
private Collection<HealthStateView> getViews(final Map<String, Collection<String>> queryParams) {
final Set<String> names = getNamesFromQueryParams(queryParams);

final Collection<HealthStateView> views;
if (shouldReturnAllViews(names)) {
return unmodifiableList(new ArrayList<>(healthStateAggregator.healthStateViews()));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private void stopIfRequired() {
try {
jettyServer.stop();
} catch (RuntimeException e) {
throw (RuntimeException) e;
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static String resourceFilePath(final String resourceClassPathLocation) {
try {
return new File(Resources.getResource(resourceClassPathLocation).toURI()).getAbsolutePath();
} catch (RuntimeException e) {
throw (RuntimeException) e;
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 775d096

Please sign in to comment.