Skip to content

Commit

Permalink
Use the proposed value on empty mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
IotaBread committed Jan 3, 2024
1 parent 48643e3 commit 60415e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ private static void cleanMappingStack(int indentation, Deque<MappingPair<?, RawE
while (indentation < mappingStack.size()) {
MappingPair<?, RawEntryMapping> pair = mappingStack.pop();
if (pair.getMapping() != null) {
EntryMapping mapping = pair.getMapping().bake();
mappings.insert(pair.getEntry(), mapping.equals(EntryMapping.DEFAULT) ? null : mapping);
mappings.insert(pair.getEntry(), pair.getMapping().bake());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public EntryMapping remove(Entry<?> entry) {
@Override
public EntryMapping get(Entry<?> entry) {
EntryMapping main = this.mainTree.get(entry);
if (main == null) {
if (main == null || main.equals(EntryMapping.DEFAULT)) {
return this.secondaryTree.get(entry);
}

Expand Down

0 comments on commit 60415e1

Please sign in to comment.