Polish "Use pattern matching for instanceof where appropriate"
See gh-31475
This commit is contained in:
parent
5db04da275
commit
0bc514593f
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue