public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
@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 instanceof List<?>) { context.setPropertyResolved(true); @SuppressWarnings("unchecked") // Must be OK to cast to Object List<Object> list = (List<Object>) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(list, idx); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(list, idx); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }