Skip to content

Commit

Permalink
Revert try with resources changes following feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Oct 29, 2024
1 parent 7a9fa0f commit 3a23f61
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/openrewrite/maven/AbstractRewriteMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ Config getConfig() throws IOException {
URI uri = new URI(configLocation);
if (uri.getScheme() != null && uri.getScheme().startsWith("http")) {
HttpSender httpSender = new HttpUrlConnectionSender();
try (HttpSender.Response send = httpSender.get(configLocation).send()) {
return new Config(send.getBody(), uri);
}
//noinspection resource
return new Config(httpSender.get(configLocation).send().getBody(), uri);
}
} catch (URISyntaxException e) {
// Try to load as a path
Expand Down

0 comments on commit 3a23f61

Please sign in to comment.