FINERACT-2081: fix sonar issues in EntityTables enum
This commit is contained in:
+5
-5
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user