Skip to content

Commit

Permalink
use try with resources for stream
Browse files Browse the repository at this point in the history
  • Loading branch information
littleaj committed Feb 19, 2020
1 parent d104fec commit 14306ba
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public final class GitBuildInfoContextInitializer implements ContextInitializer
private boolean hasBuildData;

public GitBuildInfoContextInitializer() {
try {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(BUILD_INFO_FILE_NAME);
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(BUILD_INFO_FILE_NAME)) {
if (inputStream == null) {
hasBuildData = false;
return;
Expand Down

0 comments on commit 14306ba

Please sign in to comment.