Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
6 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Now supports special chars in the test properties file.
parent
1df1d099
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/gitlab4j/api/HelperUtils.java
+3
-3
src/test/java/org/gitlab4j/api/HelperUtils.java
with
3 additions
and
3 deletions
+3
-3
src/test/java/org/gitlab4j/api/HelperUtils.java
+
3
-
3
View file @
ebb10cb3
...
@@ -3,7 +3,7 @@ package org.gitlab4j.api;
...
@@ -3,7 +3,7 @@ package org.gitlab4j.api;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
Reader
;
import
java.util.Properties
;
import
java.util.Properties
;
public
class
HelperUtils
{
public
class
HelperUtils
{
...
@@ -25,7 +25,7 @@ public class HelperUtils {
...
@@ -25,7 +25,7 @@ public class HelperUtils {
// Load the base test properties from "src/test/resources/test-gitlab4j.properties"
// Load the base test properties from "src/test/resources/test-gitlab4j.properties"
File
propertiesFile
=
new
File
(
basedir
,
"src/test/resources/test-gitlab4j.properties"
);
File
propertiesFile
=
new
File
(
basedir
,
"src/test/resources/test-gitlab4j.properties"
);
if
(
propertiesFile
.
exists
())
{
if
(
propertiesFile
.
exists
())
{
try
(
InputStream
input
=
new
FileInputStream
(
propertiesFile
))
{
try
(
InputStream
Reader
input
=
new
InputStreamReader
(
new
FileInputStream
(
propertiesFile
))
)
{
testProperties
.
load
(
input
);
testProperties
.
load
(
input
);
System
.
out
.
format
(
"Loaded base test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
System
.
out
.
format
(
"Loaded base test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
propertiesLoaded
=
true
;
propertiesLoaded
=
true
;
...
@@ -37,7 +37,7 @@ public class HelperUtils {
...
@@ -37,7 +37,7 @@ public class HelperUtils {
// Now load the overriding test properties if found in the user's home directory
// 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"
);
propertiesFile
=
new
File
((
String
)
System
.
getProperties
().
get
(
"user.home"
),
"test-gitlab4j.properties"
);
if
(
propertiesFile
.
exists
())
{
if
(
propertiesFile
.
exists
())
{
try
(
InputStream
input
=
new
FileInputStream
(
propertiesFile
))
{
try
(
InputStream
Reader
input
=
new
InputStreamReader
(
new
FileInputStream
(
propertiesFile
))
)
{
testProperties
.
load
(
input
);
testProperties
.
load
(
input
);
System
.
out
.
format
(
"Loaded overriding test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
System
.
out
.
format
(
"Loaded overriding test properties from: %n%s%n"
,
propertiesFile
.
getAbsolutePath
());
propertiesLoaded
=
true
;
propertiesLoaded
=
true
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets