Polishing

This commit is contained in:
Sam Brannen 2021-10-23 18:02:55 +02:00
parent 63509e64d4
commit e4e667acdb
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -44,7 +44,7 @@ public class MapAccessor implements CompilablePropertyAccessor {
@Override
public boolean canRead(EvaluationContext context, @Nullable Object target, String name) throws AccessException {
return (target instanceof Map && ((Map<?, ?>) target).containsKey(name));
return (target instanceof Map<?, ?> map && map.containsKey(name));
}
@Override