Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log for javapos-config-loader

## 4.0.1

- corrected logging output when loading class-path resources (solved GH issue [#11](https://github.com/JavaPOSWorkingGroup/javapos-config-loader/issues/11))

## 4.0.0

- jpos.config.DefaultCompositeRegPopulator.load() is throwing more specific IllegalArgument exception instead of RuntimeException
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ wrapper {

def artifactName = 'javapos-config-loader'
group='org.javapos'
version='4.0.0' // if version is going to be changed, first add "-SNAPSHOT" to test publishing to MavenCentral's Snapshot repo
version='4.0.1-SNAPSHOT' // if version is going to be changed, first add "-SNAPSHOT" to test publishing to MavenCentral's Snapshot repo


///////////////////////////////////////////////////////////////////////////////
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/jpos/config/simple/xml/JavaxRegPopulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ public void load() {

@Override
public void load(String fileName) {
tracer.println("loading JavaPOS configuration from file " + new File(fileName).getAbsolutePath());
try (InputStream is = new File(fileName).exists() ? new FileInputStream(fileName) : findFileInClasspath(fileName)) {
File file = new File(fileName);
if (file.exists())
tracer.println("trying to load JavaPOS configuration from file " + file.getAbsolutePath());
else
tracer.println("because JavaPOS configuration file '" + fileName + "' does not exist, trying to load it as classpath resource");
try (InputStream is = file.exists() ? new FileInputStream(fileName) : findFileInClasspath(fileName)) {
load(is);
} catch (Exception e) {
tracer.println("Error while loading populator file Exception.message: " + e.getMessage());
Expand Down
Loading