final PFUserDO contextUser = PFUserContext.getUser();
final String userPk = contextUser != null ? contextUser.getId().toString() : null;
if (userPk == null) {
log.warn("No user found for creating history entry.");
}
historyAdapter.createHistoryEntry(entity, id, new HistoryUserRetriever() {
public String getPrincipal()
{
return userPk;
}
}, property, valueClass, oldValue, newValue);