Cherry pick upstream commits to fix SideEffectSet (#1737)

* Fix SideEffectSet.none() being the default set (#1620)

* Fix SideEffectSet.none() being the default set

* Remove the unnecessary private empty constructor for SideEffectSet

* Back to ImmutableMap.of

* Speed up Fast Reorder Mode and make it default (#1653)

* Speed up Fast Reorder Mode and make it default

* Make non-exposed side effects internal

* Docs on isExposed

Co-authored-by: Matthew Miller <mnmiller1@me.com>
This commit is contained in:
Jordan
2022-05-10 09:11:12 +01:00
committed by GitHub
parent d7543884a5
commit b237ddf076
6 changed files with 63 additions and 25 deletions

View File

@ -59,7 +59,9 @@ public class SideEffectConverter implements ArgumentConverter<SideEffect> {
@Override
public List<String> getSuggestions(String input, InjectedValueAccess context) {
return limitByPrefix(getSideEffects().stream().map(sideEffect -> sideEffect.name().toLowerCase(Locale.US)), input);
return limitByPrefix(getSideEffects().stream()
.filter(SideEffect::isExposed)
.map(sideEffect -> sideEffect.name().toLowerCase(Locale.US)), input);
}
@Override