Skip to content

Commit

Permalink
improved localization default for enum
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 18, 2024
1 parent 8d00e17 commit c8fc668
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class MidPointUtils {

public static final Pattern UUID_PATTERN = Pattern.compile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");

public static final Comparator<ObjectTypes> OBJECT_TYPES_COMPARATOR = (o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getTypeQName().getLocalPart(), o2.getTypeQName().getLocalPart());
public static final Comparator<ObjectTypes> OBJECT_TYPES_COMPARATOR = Comparator.comparing(o -> o.name());

public static final Comparator<ObjectType> OBJECT_TYPE_COMPARATOR = (o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(getOrigFromPolyString(o1.getName()), getOrigFromPolyString(o2.getName()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public String translateEnum(Enum<?> e, String nullKey) {
}

String key = MidPointUtils.createKeyForEnum(e);
return translate(key);
return translate(key, key);
}

public String translate(String key) {
Expand Down

0 comments on commit c8fc668

Please sign in to comment.