Ask Commons Configuration 2.x for lists of the type the code expects

MSAL

Before 1.7, getList returned a raw List, which code could assign to a List<String>. 2.x returns a List<Object>, which it can't, so this asks for the element type instead, as in getList(String.class, key, new ArrayList<>()), which converts the values to it. The default keeps the empty list that 1.x returned for a missing key. This recipe matches the 1.x API by the names the move to the org.apache.commons.configuration2 package gives it, and is meant to run as part of UpgradeApacheCommonsConfiguration_1_2.

org.openrewrite.apache.commons.configuration.MigrateUntypedListGetters
mod run . --recipe=org.openrewrite.apache.commons.configuration.MigrateUntypedListGetters

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.