/** * Carry out the change to the value by invoking the {@link ValueChangeListener} with the value * resolved by {@link #prepareValueChange(ValueDefinition, ConfigurationSource)}. * * @param valueChangeAction the action to perform * @throws ValueConfigurationException if the listener throws a {@link RuntimeException}. */ @SuppressWarnings({"rawtypes", "unchecked"}) public void enactValueChange(ValueChangeAction valueChangeAction) { ValueDefinition<?, ?> valueDefinition = valueChangeAction.getValueDefinition(); Object newValue = valueChangeAction.getNewValue(); Object oldValue = valueChangeAction.getOldValue(); ValueChangeListener listener = valueDefinition.getChangeListener(); try { listener.onChange(newValue, oldValue); } catch (RuntimeException e) { throw new ValueConfigurationException( "value assignment", valueDefinition.getType(), valueDefinition.getExpression(), e); } }