Polishing
This commit is contained in:
parent
63509e64d4
commit
e4e667acdb
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -44,7 +44,7 @@ public class MapAccessor implements CompilablePropertyAccessor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRead(EvaluationContext context, @Nullable Object target, String name) throws AccessException {
|
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
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue