Skip to content

Commit ebb10cb

Browse files
committed
Now supports special chars in the test properties file.
1 parent 1df1d09 commit ebb10cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/gitlab4j/api/HelperUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.io.File;
44
import java.io.FileInputStream;
55
import java.io.IOException;
6-
import java.io.InputStream;
6+
import java.io.InputStreamReader;
77
import java.util.Properties;
88

99
public class HelperUtils {
@@ -25,7 +25,7 @@ public class HelperUtils {
2525
// Load the base test properties from "src/test/resources/test-gitlab4j.properties"
2626
File propertiesFile = new File(basedir, "src/test/resources/test-gitlab4j.properties");
2727
if (propertiesFile.exists()) {
28-
try (InputStream input = new FileInputStream(propertiesFile)) {
28+
try (InputStreamReader input = new InputStreamReader(new FileInputStream(propertiesFile))) {
2929
testProperties.load(input);
3030
System.out.format("Loaded base test properties from: %n%s%n", propertiesFile.getAbsolutePath());
3131
propertiesLoaded = true;
@@ -37,7 +37,7 @@ public class HelperUtils {
3737
// Now load the overriding test properties if found in the user's home directory
3838
propertiesFile = new File((String) System.getProperties().get("user.home"), "test-gitlab4j.properties");
3939
if (propertiesFile.exists()) {
40-
try (InputStream input = new FileInputStream(propertiesFile)) {
40+
try (InputStreamReader input = new InputStreamReader(new FileInputStream(propertiesFile))) {
4141
testProperties.load(input);
4242
System.out.format("Loaded overriding test properties from: %n%s%n", propertiesFile.getAbsolutePath());
4343
propertiesLoaded = true;

0 commit comments

Comments
 (0)