Skip to content

Commit 2a77fc5

Browse files
committed
Release 0.6.8. Mac OS fix for ini file location. Fix for contains when using INISet facade documents.
1 parent c1247f9 commit 2a77fc5

10 files changed

Lines changed: 19 additions & 9 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,12 @@ Thanks to others who have contributed to Jini.
386386

387387
## Changes
388388

389+
### 0.6.8
390+
391+
* Mac OS path for user configuration files prefixed with `.` where it should not be.
392+
* `contains()` method for `INISet` facade documents would return `true` if a key didn't exists as a value but had a schema entry with no default values.
393+
394+
389395
### 0.6.7
390396

391397
* `INISet` gets a `commit()` and `groupWrite(Consumer<INI> callback)` method. The former forces writing of the user settings, and the latter allows a multiple keys and sections to be updated without a write triggering until the task is complete. The `groupWrite` may be moved to the `INI` interface at some point.

config/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<artifactId>jini</artifactId>
2424
<groupId>com.sshtools</groupId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
<relativePath>../</relativePath>
2727
</parent>
2828
<artifactId>jini-config</artifactId>

config/src/main/java/com/sshtools/jini/config/INISet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ private static boolean isMacOs() {
740740

741741
public Path appPathForScope(Scope scope) {
742742
var root = rootPathForScope(scope);
743-
if (!isLinux() && !isWindows() && scope == Scope.USER) {
743+
if (!isLinux() && !isMacOs() && !isWindows() && scope == Scope.USER) {
744744
return root.resolve("." + app);
745745
} else {
746746
return root.resolve(app);

lib/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<artifactId>jini</artifactId>
2424
<groupId>com.sshtools</groupId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
<relativePath>../</relativePath>
2727
</parent>
2828
<artifactId>jini-lib</artifactId>

maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.sshtools</groupId>
2424
<artifactId>jini</artifactId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
</parent>
2727
<properties>
2828
<mavenVersion>3.6.3</mavenVersion>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<modelVersion>4.0.0</modelVersion>
2222
<groupId>com.sshtools</groupId>
2323
<artifactId>jini</artifactId>
24-
<version>0.6.7</version>
24+
<version>0.6.8</version>
2525
<name>Jini - Java INI file reader and writer</name>
2626
<packaging>pom</packaging>
2727
<properties>

prefs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<artifactId>jini</artifactId>
2424
<groupId>com.sshtools</groupId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
<relativePath>../</relativePath>
2727
</parent>
2828
<artifactId>jini-prefs</artifactId>

schema/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<artifactId>jini</artifactId>
2424
<groupId>com.sshtools</groupId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
<relativePath>../</relativePath>
2727
</parent>
2828
<artifactId>jini-schema</artifactId>

schema/src/main/java/com/sshtools/jini/schema/INISchema.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ public AbstractSchemaWrapper(DEL delegate, AbstractSchemaWrapper<?> parent, INIS
273273

274274
@Override
275275
public Optional<Section[]> allSectionsOr(String... path) {
276+
if(Arrays.asList(path).contains("pricli")) {
277+
System.out.println("brk!");
278+
}
276279
var allSections = super.allSectionsOr(path).orElse(new Section[0]);
277280
var mgr = new LinkedHashMap<String, Section[]>();
278281
for(var sec : allSections) {
@@ -311,7 +314,8 @@ public void setKeyComments(String key, String... comments) {
311314

312315
@Override
313316
public boolean contains(String key) {
314-
return delegate.contains(key) || userObject.keyOr(this, key).isPresent();
317+
return delegate.contains(key) ||
318+
( userObject.keyOr(this, key).map(k -> k.defaultValues().length > 0).orElse(false) );
315319
}
316320

317321
@Override

serialization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<artifactId>jini</artifactId>
2424
<groupId>com.sshtools</groupId>
25-
<version>0.6.7</version>
25+
<version>0.6.8</version>
2626
<relativePath>../</relativePath>
2727
</parent>
2828
<artifactId>jini-serialzation</artifactId>

0 commit comments

Comments
 (0)