MCPcopy Index your code
hub / github.com/apache/tomcat / setValue

Method setValue

java/jakarta/el/MapELResolver.java:85–105  ·  view source on GitHub ↗
(ELContext context, Object base, Object property, Object value)

Source from the content-addressed store, hash-verified

83 }
84
85 @Override
86 public void setValue(ELContext context, Object base, Object property, Object value) {
87 Objects.requireNonNull(context);
88
89 if (base instanceof Map<?,?>) {
90 context.setPropertyResolved(base, property);
91
92 if (this.readOnly) {
93 throw new PropertyNotWritableException(
94 Util.message(context, "resolverNotWritable", base.getClass().getName()));
95 }
96
97 try {
98 @SuppressWarnings("unchecked") // Must be OK
99 Map<Object,Object> map = ((Map<Object,Object>) base);
100 map.put(property, value);
101 } catch (UnsupportedOperationException e) {
102 throw new PropertyNotWritableException(e);
103 }
104 }
105 }
106
107 @Override
108 public boolean isReadOnly(ELContext context, Object base, Object property) {

Callers 5

testSetValue01Method · 0.95
testSetValue03Method · 0.95
testSetValue04Method · 0.95
testSetValue05Method · 0.95
doNegativeTestMethod · 0.95

Calls 4

messageMethod · 0.95
getNameMethod · 0.65
putMethod · 0.65
setPropertyResolvedMethod · 0.45

Tested by 5

testSetValue01Method · 0.76
testSetValue03Method · 0.76
testSetValue04Method · 0.76
testSetValue05Method · 0.76
doNegativeTestMethod · 0.76