Skip to content

Commit

Permalink
Solve minor comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andru Stefanescu <als209@cam.ac.uk>
  • Loading branch information
andru47 committed Aug 16, 2021
1 parent bbaf5c6 commit 7f2bb16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docs/report_generation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ The encoding for the file is assumed to be `UTF-8`, but can be customized with t
----
jgiven.config.charset
----
The following can be defined the properties file:
The following can be defined in the properties file:
----
jgiven.report.enabled
jgiven.report.dir
jgiven.report.text
jgiven.report.enabled=false
jgiven.report.dir=<targetDir>
jgiven.report.text=false
jgiven.report.text.color
jgiven.report.filterStackTrace
jgiven.report.filterStackTrace=true
----
Configuration defined via Java system properties will take precedence over values in the configuration file.
6 changes: 2 additions & 4 deletions jgiven-core/src/main/java/com/tngtech/jgiven/impl/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ private static Properties loadConfigFileProperties() {
String path = System.getProperty(JGIVEN_CONFIG_PATH, "jgiven.properties");
String charset = System.getProperty(JGIVEN_CONFIG_CHARSET, "UTF-8");
Properties properties = new Properties();
try {
try (Reader reader = Files.newBufferedReader(Paths.get(path), Charset.forName(charset))) {
properties.load(reader);
}
try (Reader reader = Files.newBufferedReader(Paths.get(path), Charset.forName(charset))) {
properties.load(reader);
} catch (IOException e) {
log.debug("config file " + path + " not loaded: " + e.getMessage());
}
Expand Down

0 comments on commit 7f2bb16

Please sign in to comment.