public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); Array.set(base, idx, value); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); if (value != null && !base.getClass().getComponentType().isAssignableFrom( value.getClass())) { throw new ClassCastException(message(context, "objectNotAssignable", new Object[] {value.getClass().getName(), base.getClass().getComponentType().getName()})); } Array.set(base, idx, value); } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); Array.set(base, idx, value); } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); try { Array.set(base, idx, value); } catch (IllegalArgumentException e) { ClassCastException ex = new ClassCastException(e.getMessage()); ex.initCause(e); throw ex; } } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base != null && base.getClass().isArray()) { context.setPropertyResolved(true); if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(base, idx); try { Array.set(base, idx, value); } catch (IllegalArgumentException e) { ClassCastException ex = new ClassCastException(e.getMessage()); ex.initCause(e); throw ex; } } }