Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed May 5, 2024
1 parent b71d7b3 commit 609fd2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/io/github/mmm/property/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ public WritableProperty<V> getReadOnly() {

if (this.readOnlyProperty == null) {
if (this.metadata.getExpression() != null) {
// TODO might be incorrect since lock can still point to writable bean, must be bullet-proof
this.readOnlyProperty = this;
} else {
Property<V> copy = copy(null, this.metadata.withExpression(createReadOnlyExpression()));
Property<V> copy = copy(null, this.metadata.withLock(null).withExpression(createReadOnlyExpression()));
copy.makeReadOnly();
this.readOnlyProperty = copy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ private void verifyJsonMarshalling(P property) {
if (property instanceof ReadableSimpleValue simple) {
assertThat(json).contains(simple.getAsString());
}

}

/**
Expand Down

0 comments on commit 609fd2b

Please sign in to comment.