20929: Add generic types to DebugModifiers. Courtesy of fredg1. This generally reduces unchecked...

RSS Bot

Feed Reader
Add generic types to DebugModifiers.

Courtesy of fredg1. This generally reduces unchecked casts from
Object, which safeguards against future misuse of these shared maps by
inserting incorrectly typed objects.

This change also reduces DebugModifers.allModifiers()'s dependence on
mutable global state, which is generally a good thing.

To test this, we use the `modifies` CLI command, which fetches all
modifiers that match some filter string. We select "water level" as
something that was used in an old path (Heavy Rains), which we expect
is unlikely to be used by new content, or conflict with future
modifier names.

by heeheehee on 2021-09-13 04:02:15

M /src/data/modifiers.txt (view) (diff)
M /src/net/sourceforge/kolmafia/DebugModifiers.java (view) (diff)
A /test/root/expected/debug_modifiers_all_modifiers.txt.out (view)
A /test/root/scripts/debug_modifiers_all_modifiers.txt (view)
 
Top