Skip to content

Commit

Permalink
Avoid Stream usage
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyy-dev committed Oct 8, 2021
1 parent f2dfa65 commit 47f955e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ public boolean isEmpty() {

@Override
public Object @NotNull [] toArray() {
return Arrays.stream(StyleImpl.DECORATIONS).map(DecorationMap.this::get).toArray(TextDecoration.State[]::new);
final TextDecoration.State[] states = new TextDecoration.State[MAP_SIZE];
for (int i = 0; i < MAP_SIZE; i++) {
states[i] = DecorationMap.this.get(StyleImpl.DECORATIONS[i]);
}
return states;
}

@Override
Expand Down

0 comments on commit 47f955e

Please sign in to comment.