Ensure MapAccessor#canWrite only returns true for a Map target
Closes gh-33265
This commit is contained in:
@@ -81,7 +81,7 @@ public class MapAccessor implements CompilablePropertyAccessor {
|
||||
|
||||
@Override
|
||||
public boolean canWrite(EvaluationContext context, @Nullable Object target, String name) throws AccessException {
|
||||
return this.allowWrite;
|
||||
return (this.allowWrite && target instanceof Map);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user