Polish "Use pattern matching for instanceof where appropriate"

See gh-31475
This commit is contained in:
Andy Wilkinson 2022-06-20 17:55:51 +01:00
parent 5db04da275
commit 0bc514593f

View File

@ -315,7 +315,7 @@ public class BomExtension {
public Object methodMissing(String name, Object args) {
if (args instanceof Object[] && ((Object[]) args).length == 1) {
Object arg = ((Object[]) args)[0];
if (arg instanceof Closure closure) {
if (arg instanceof Closure<?> closure) {
ModuleHandler moduleHandler = new ModuleHandler();
closure.setResolveStrategy(Closure.DELEGATE_FIRST);
closure.setDelegate(moduleHandler);