Skip to content

Commit

Permalink
Fix review findings
Browse files Browse the repository at this point in the history
Signed-off-by: Avgustin Marinov <[email protected]>
  • Loading branch information
avgustinmm committed Dec 16, 2024
1 parent c66c054 commit 6df13d5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
package org.eclipse.hawkbit.repository.jpa.model;

import java.io.Serializable;
import java.util.concurrent.TimeUnit;

import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.PostPersist;
import jakarta.persistence.PostRemove;
import jakarta.persistence.PostUpdate;

import org.eclipse.hawkbit.repository.Identifiable;
import org.eclipse.hawkbit.repository.jpa.model.helper.AfterTransactionCommitExecutorHolder;
import org.eclipse.hawkbit.repository.model.BaseEntity;
import org.eclipse.hawkbit.tenancy.TenantAwareAuthenticationDetails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void postUpdate(final DescriptorEvent event) {
final Object object = event.getObject();
if (((UpdateObjectQuery) event.getQuery()).getObjectChangeSet().getChangedAttributeNames().stream()
.anyMatch(field -> !TARGET_UPDATE_EVENT_IGNORE_FIELDS.contains(field))) {
((AbstractJpaBaseEntity)object).doNotify(() -> ((EventAwareEntity) object).fireUpdateEvent());
AbstractJpaBaseEntity.doNotify(() -> ((EventAwareEntity) object).fireUpdateEvent());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void onPostUpdate(final PostUpdateEvent event) {
}

if (hasNonIgnoredChanges || !lastTargetQueryChanged) {
((AbstractJpaBaseEntity)event.getEntity()).doNotify(() -> ((EventAwareEntity) event.getEntity()).fireUpdateEvent());
AbstractJpaBaseEntity.doNotify(() -> ((EventAwareEntity) event.getEntity()).fireUpdateEvent());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ public ValidationOracleContext suggest(final String rsqlQuery, final int cursorP
} catch (final JpaSystemException e) {
// noop
} catch (final RuntimeException e) {
if ("org.eclipse.persistence.exceptions.ConversionException".equals(e.getClass().getName())) {
// noop
} else {
if (!"org.eclipse.persistence.exceptions.ConversionException".equals(e.getClass().getName())) {
throw e;
}
}
Expand Down

0 comments on commit 6df13d5

Please sign in to comment.