Fix incorrect return value from deduplicated postprocessing map

This commit is contained in:
embeddedt 2023-08-02 16:30:18 -04:00
parent 0d190a4c80
commit f4ab932924
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -35,7 +35,13 @@ public class FerriteCorePostProcess {
toKeyIndex = keyIndex;
}
private static final Object2IntMap<?> EMPTY_MAP = Object2IntMaps.unmodifiable(new Object2IntArrayMap<>());
private static final Object2IntMap<?> EMPTY_MAP;
static {
Object2IntArrayMap<?> map = new Object2IntArrayMap<>();
map.defaultReturnValue(-1);
EMPTY_MAP = Object2IntMaps.unmodifiable(map);
}
public static <O, S extends StateHolder<O, S>> void postProcess(StateDefinition<O, S> state) {
if(!willPostProcess)