Skip to content

Commit

Permalink
Merge pull request xmlresolver#22 from ndw/dev
Browse files Browse the repository at this point in the history
Remove `xmlresolver.properties` from the distribution
  • Loading branch information
ndw committed Mar 6, 2019
2 parents f6260ac + 2206a94 commit f1be823
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ See also: https://xmlresolver.org/

## Release notes

### 1.0.1, 5 March 2019

* Removed the default `xmlresolver.properties` file that shipped in the XML Resolver jar file.
This fixes [issue 21](https://github.com/ndw/xmlresolver/issues/21) but introduces no change
in behavior because the default values in the absence of a property configuration file are all
the same as what was in that default properties file.

### 1.0.0, 2 March 2019

* Let’s call it 1.0.0!
Expand Down
19 changes: 9 additions & 10 deletions core/src/main/java/org/xmlresolver/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
* @author swachter
*/
public class Configuration {
private final Properties properties;
private final URL propertiesFileUri;

public Configuration(Properties properties, URL propertiesFileUri) {
Catalog.logger.debug("XMLResolver version " + BuildConfig.VERSION);
Catalog.logger.debug("Loading xmlresolver.properties: " + propertiesFileUri);
this.properties = properties;
this.propertiesFileUri = propertiesFileUri;
}

private static boolean isTrue(String aString) {
return "true".equalsIgnoreCase(aString) || "yes".equalsIgnoreCase(aString) || "1".equalsIgnoreCase(aString);
Expand Down Expand Up @@ -77,8 +86,6 @@ private static Configuration fromProperties(URL propurl) {
Configuration config = null;

if (propurl != null) {
Catalog.logger.debug("XMLResolver version " + BuildConfig.VERSION);
Catalog.logger.debug("Loading xmlresolver.properties: " + propurl);
Properties properties = new Properties();
try {
properties.load(propurl.openStream());
Expand All @@ -91,14 +98,6 @@ private static Configuration fromProperties(URL propurl) {
return config;
}

private final Properties properties;
private final URL propertiesFileUri;

public Configuration(Properties properties, URL propertiesFileUri) {
this.properties = properties;
this.propertiesFileUri = propertiesFileUri;
}

private String getProperty(String aPropertyName) {
return properties != null ? properties.getProperty(aPropertyName) : null;
}
Expand Down
8 changes: 0 additions & 8 deletions core/src/main/resources/xmlresolver.properties

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=1.0.0
version=1.0.1a
group=org.xmlresolver

0 comments on commit f1be823

Please sign in to comment.