KEYCLOAK-14359 Close InputStream in org.keycloak.common.Version

This commit is contained in:
Thomas Darimont 2020-06-02 12:05:21 +02:00 committed by Stian Thorgersen
parent 0870041b0b
commit ddeaa6b3c4

View file

@ -37,9 +37,8 @@ public class Version {
public static String DEFAULT_PROFILE;
static {
Properties props = new Properties();
InputStream is = Version.class.getResourceAsStream("/keycloak-version.properties");
try {
try (InputStream is = Version.class.getResourceAsStream("/keycloak-version.properties")) {
Properties props = new Properties();
props.load(is);
Version.NAME = props.getProperty("name");
Version.NAME_FULL = props.getProperty("name-full");