Skip to content

Commit

Permalink
fix: changed HashSet to LinkedHashSet to keep order (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Mar 5, 2024
1 parent f7d1f21 commit 1dba203
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -32,7 +33,7 @@ public interface MicrofrontendsMapper {
default Set<String> map(String classifications) {
if (classifications != null && !classifications.isBlank()) {
String[] values = classifications.split(",");
return new HashSet<>(Arrays.asList(values));
return new LinkedHashSet<>(Arrays.asList(values));
} else
return new HashSet<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default Set<String> workspaceNames(WorkspacePageResult result) {
default Set<String> map(String classifications) {
if (classifications != null && !classifications.isBlank()) {
String[] values = classifications.split(",");
return new HashSet<>(Arrays.asList(values));
return new LinkedHashSet<>(Arrays.asList(values));
} else
return new HashSet<>();
}
Expand Down

0 comments on commit 1dba203

Please sign in to comment.