| 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) { |