FINERACT-2081: fix sonar issues in EntityTables enum

This commit is contained in:
Hossam Hatem
2025-02-26 15:04:28 +01:00
committed by Adam Saghy
parent 2cf99818e6
commit 8c5606ea8e
@@ -49,11 +49,11 @@ public enum EntityTables {
SHARE_PRODUCT("m_share_product", "share_product_id", "id"), //
;
public static final EntityTables[] VALUES = values();
static final EntityTables[] ENTITY_VALUES = values();
private static final List<String> ENTITY_NAMES = Arrays.stream(VALUES).map(EntityTables::getName).toList();
private static final List<String> ENTITY_NAMES = Arrays.stream(ENTITY_VALUES).map(EntityTables::getName).toList();
private static final Map<String, EntityTables> BY_ENTITY_NAME = Arrays.stream(VALUES)
private static final Map<String, EntityTables> BY_ENTITY_NAME = Arrays.stream(ENTITY_VALUES)
.collect(Collectors.toMap(EntityTables::getName, e -> e));
@NotNull
@@ -106,7 +106,7 @@ public enum EntityTables {
}
public boolean hasCheck() {
return checkStatuses != null && !checkStatuses.isEmpty();
return !checkStatuses.isEmpty();
}
public static List<String> getEntityNames() {
@@ -135,6 +135,6 @@ public enum EntityTables {
@NotNull
public static List<EntityTables> getFiltered(Predicate<EntityTables> filter) {
return Arrays.stream(VALUES).filter(filter).toList();
return Arrays.stream(ENTITY_VALUES).filter(filter).toList();
}
}