mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Ensure MapAccessor#canWrite only returns true for a Map target
Closes gh-33265
This commit is contained in:
+1
-1
@@ -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