Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
ebb10cb3
Commit
ebb10cb3
authored
May 09, 2019
by
Greg Messner
Browse files
Now supports special chars in the test properties file.
parent
1df1d099
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/HelperUtils.java
View file @
ebb10cb3
...
...
@@ -3,7 +3,7 @@ package org.gitlab4j.api;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
Reader
;
import
java.util.Properties
;
public
class
HelperUtils
{
...
...
@@ -25,7 +25,7 @@ public class HelperUtils {
// Load the base test properties from "src/test/resources/test-gitlab4j.properties"
File
propertiesFile
=
new
File
(
basedir
,
"src/test/resources/test-gitlab4j.properties"
);
if
(
propertiesFile
.
exists
())
{
try
(
InputStream
input
=
new
FileInputStream
(
propertiesFile
))
{
try
(
InputStream
Reader
input
=
new
InputStreamReader
(
new
FileInputStream
(
propertiesFile
))
)
{
testProperties
.
load
(
input
);
System
.
out
.
format
(
"Loaded base test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
propertiesLoaded
=
true
;
...
...
@@ -37,7 +37,7 @@ public class HelperUtils {
// Now load the overriding test properties if found in the user's home directory
propertiesFile
=
new
File
((
String
)
System
.
getProperties
().
get
(
"user.home"
),
"test-gitlab4j.properties"
);
if
(
propertiesFile
.
exists
())
{
try
(
InputStream
input
=
new
FileInputStream
(
propertiesFile
))
{
try
(
InputStream
Reader
input
=
new
InputStreamReader
(
new
FileInputStream
(
propertiesFile
))
)
{
testProperties
.
load
(
input
);
System
.
out
.
format
(
"Loaded overriding test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
propertiesLoaded
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment