Skip to content

Commit

Permalink
FINERACT-2081: fix sonar issues in EntityTables enum
Browse files Browse the repository at this point in the history
  • Loading branch information
7ossam7atem1 authored and adamsaghy committed Feb 26, 2025
1 parent 2cf9981 commit 8c5606e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,7 +106,7 @@ public List<StatusEnum> getCheckStatuses() {
}

public boolean hasCheck() {
return checkStatuses != null && !checkStatuses.isEmpty();
return !checkStatuses.isEmpty();
}

public static List<String> getEntityNames() {
Expand Down Expand Up @@ -135,6 +135,6 @@ public static List<Integer> getCheckStatusCodes(String name) {

@NotNull
public static List<EntityTables> getFiltered(Predicate<EntityTables> filter) {
return Arrays.stream(VALUES).filter(filter).toList();
return Arrays.stream(ENTITY_VALUES).filter(filter).toList();
}
}

0 comments on commit 8c5606e

Please sign in to comment.