Skip to content

Commit f4ab932

Browse files
committed
Fix incorrect return value from deduplicated postprocessing map
1 parent 0d190a4 commit f4ab932

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/blockstate/FerriteCorePostProcess.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ public class FerriteCorePostProcess {
3535
toKeyIndex = keyIndex;
3636
}
3737

38-
private static final Object2IntMap<?> EMPTY_MAP = Object2IntMaps.unmodifiable(new Object2IntArrayMap<>());
38+
private static final Object2IntMap<?> EMPTY_MAP;
39+
40+
static {
41+
Object2IntArrayMap<?> map = new Object2IntArrayMap<>();
42+
map.defaultReturnValue(-1);
43+
EMPTY_MAP = Object2IntMaps.unmodifiable(map);
44+
}
3945

4046
public static <O, S extends StateHolder<O, S>> void postProcess(StateDefinition<O, S> state) {
4147
if(!willPostProcess)

0 commit comments

Comments
 (0)