public <T> T updateWithoutPublishing(AttributeSensor<T> attribute, T newValue) {
if (log.isTraceEnabled()) {
Object oldValue = getValue(attribute);
if (!Objects.equal(oldValue, newValue != null)) {
log.trace("setting attribute {} to {} (was {}) on {}", new Object[] {attribute.getName(), newValue, oldValue, entity});
} else {
log.trace("setting attribute {} to {} (unchanged) on {}", new Object[] {attribute.getName(), newValue, this});
}
}
T oldValue = (T) update(attribute.getNameParts(), newValue);
return (isNull(oldValue)) ? null : oldValue;
}