Sonar Fixes (6) (#2214)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -91,8 +91,8 @@ class HawkbitEclipseLinkJpaDialect extends EclipseLinkJpaDialect {
|
||||
Throwable exception = jpaSystemException;
|
||||
do {
|
||||
final Throwable cause = exception.getCause();
|
||||
if (cause instanceof SQLException) {
|
||||
return (SQLException) cause;
|
||||
if (cause instanceof SQLException sqlException) {
|
||||
return sqlException;
|
||||
}
|
||||
exception = cause;
|
||||
} while (exception != null);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EntityPropertyChangeListener extends DescriptorEventAdapter {
|
||||
final Object object = event.getObject();
|
||||
if (((UpdateObjectQuery) event.getQuery()).getObjectChangeSet().getChangedAttributeNames().stream()
|
||||
.anyMatch(field -> !TARGET_UPDATE_EVENT_IGNORE_FIELDS.contains(field))) {
|
||||
AbstractJpaBaseEntity.doNotify(() -> ((EventAwareEntity) object).fireUpdateEvent());
|
||||
AbstractBaseEntity.doNotify(((EventAwareEntity) object)::fireUpdateEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user