Descriptor file release (#16659)

Closes #16657

Co-authored-by: Khvatov-Alexey <Khvatov-Alexey>
This commit is contained in:
Khvatov-Alexey 2023-01-27 13:29:42 +03:00 committed by GitHub
parent f067c9aa26
commit a4c78a05d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ import org.keycloak.common.profile.PropertiesProfileConfigResolver;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
@ -112,7 +113,9 @@ public class ProfileTest {
Path profileProperties = tempDirectory.resolve("profile.properties");
properties.store(new FileOutputStream(profileProperties.toFile()), "");
try(OutputStream out = Files.newOutputStream(profileProperties.toFile().toPath())) {
properties.store(out, "");
}
Profile.configure(new PropertiesFileProfileConfigResolver());
@ -169,7 +172,9 @@ public class ProfileTest {
Path profileProperties = tempDirectory.resolve("profile.properties");
properties.store(new FileOutputStream(profileProperties.toFile()), "");
try(OutputStream out = Files.newOutputStream(profileProperties.toFile().toPath())) {
properties.store(out, "");
}
Profile.configure(new PropertiesFileProfileConfigResolver());