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

Method isReadOnly

java/jakarta/el/ArrayELResolver.java:124–143  ·  view source on GitHub ↗
(ELContext context, Object base, Object property)

Source from the content-addressed store, hash-verified

122 }
123
124 @Override
125 public boolean isReadOnly(ELContext context, Object base, Object property) {
126 Objects.requireNonNull(context);
127
128 if (base != null && base.getClass().isArray()) {
129 context.setPropertyResolved(base, property);
130 if (LENGTH_PROPERTY_NAME.equals(property)) {
131 // Always read-only
132 return true;
133 }
134 try {
135 int idx = coerce(property);
136 checkBounds(base, idx);
137 } catch (IllegalArgumentException e) {
138 // ignore
139 }
140 }
141
142 return this.readOnly;
143 }
144
145 @Override
146 public Class<?> getCommonPropertyType(ELContext context, Object base) {

Callers 6

testIsReadOnly01Method · 0.95
testIsReadOnly02Method · 0.95
testIsReadOnly03Method · 0.95
testIsReadOnly06Method · 0.95
testIsReadOnly07Method · 0.95

Calls 5

coerceMethod · 0.95
checkBoundsMethod · 0.95
isArrayMethod · 0.80
equalsMethod · 0.65
setPropertyResolvedMethod · 0.45

Tested by 6

testIsReadOnly01Method · 0.76
testIsReadOnly02Method · 0.76
testIsReadOnly03Method · 0.76
testIsReadOnly06Method · 0.76
testIsReadOnly07Method · 0.76