Skip to content

Commit

Permalink
Extension Definition are not freezable
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Tkáčik <tonydamage@gmail.com>
  • Loading branch information
tonydamage committed Jan 31, 2024
1 parent 9160dee commit 6fd7416
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public abstract class AbstractFreezable implements Freezable {

@Override
public final void freeze() {
if (skipFreeze()) {
return;
}
if (!frozen) {
performFreeze();
this.frozen = true;
Expand All @@ -26,6 +29,10 @@ protected void freezeAll(Iterable<? extends Freezable> children) {
}
}

protected boolean skipFreeze() {
return false;
}

protected void performFreeze() {
// Intentional NOOP, for overriding
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,10 @@ public boolean isStrictAnyMarker() {
public void setStrictAnyMarker(boolean marker) {
strictAnyMarker = marker;
}

@Override
protected boolean skipFreeze() {
return extensionForType != null;

}
}

0 comments on commit 6fd7416

Please sign in to comment.