@Test void testSetFails() { AttributeResolver ar = new AttributeResolver(); ELContext context = Mockito.mock(ELContext.class); try { ar.setValue(context, new MyResource(Map.of("name", "jarda")), "name", "surname"); fail("The resolver should be read-only"); } catch (PropertyNotWritableException e) { } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); }
AttributeResolver extends ELResolver { @Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); } }
AttributeResolver extends ELResolver { @Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); }  }
AttributeResolver extends ELResolver { @Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); }  @Override Class<?> getCommonPropertyType(ELContext context, Object base); @Override Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base); @Override Class<?> getType(ELContext context, Object base, Object property); @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property); @Override void setValue(ELContext context, Object base, Object property, Object value); }
AttributeResolver extends ELResolver { @Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); }  @Override Class<?> getCommonPropertyType(ELContext context, Object base); @Override Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base); @Override Class<?> getType(ELContext context, Object base, Object property); @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property); @Override void setValue(ELContext context, Object base, Object property, Object value);  }