Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Nov 13, 2023
1 parent a9cd96f commit 209f695
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/src/main/java/net/fellbaum/jemoji/EmojiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static Map<String, Emoji> getEmojiAliasToEmoji(final AliasGroup aliasGro
return ALIAS_GROUP_TO_EMOJI_ALIAS_TO_EMOJI.computeIfAbsent(aliasGroup, group -> {
final Map<String, Emoji> emojiAliasToEmoji = new HashMap<>();
for (final Emoji emoji : EMOJIS_LENGTH_DESCENDING) {
for (String alias : group.getAliasCollectionSupplier().apply(emoji)) {
for (final String alias : group.getAliasCollectionSupplier().apply(emoji)) {
emojiAliasToEmoji.put(alias, emoji);
}
}
Expand Down Expand Up @@ -170,8 +170,9 @@ public static Optional<Emoji> getByAlias(final String alias) {
return Arrays.stream(AliasGroup.values())
.map(EmojiManager::getEmojiAliasToEmoji)
.filter(m -> m.containsKey(aliasWithColon) || m.containsKey(aliasWithoutColon))
.map(m -> getEither(m, aliasWithColon, aliasWithoutColon))
.findAny();
.map(m -> findEmojiByEitherAlias(m, aliasWithColon, aliasWithoutColon))
.findAny()
.flatMap(Function.identity());
}

/**
Expand Down

0 comments on commit 209f695

Please sign in to comment.