diff --git a/judo-ui-typescript-rest-service/src/main/java/hu/blackbelt/judo/ui/generator/typescript/rest/service/UiServiceHelper.java b/judo-ui-typescript-rest-service/src/main/java/hu/blackbelt/judo/ui/generator/typescript/rest/service/UiServiceHelper.java index f3df253..64181ce 100644 --- a/judo-ui-typescript-rest-service/src/main/java/hu/blackbelt/judo/ui/generator/typescript/rest/service/UiServiceHelper.java +++ b/judo-ui-typescript-rest-service/src/main/java/hu/blackbelt/judo/ui/generator/typescript/rest/service/UiServiceHelper.java @@ -51,19 +51,17 @@ public static List getAccessRelationsTypes(Application application } public static String accessJoinedImportTokens(Application application) { - HashSet tokens = new HashSet<>(); + HashSet tokens = new LinkedHashSet<>(); if (application.getPrincipal() != null) { tokens.add(classDataName(application.getPrincipal(), "Stored")); } - List relations = getAccessRelationsTypes(application); - relations.forEach(relation -> { - tokens.add(classDataName(relation.getTarget(), "Stored")); - }); + getAccessRelationsTypes(application) + .forEach(relation -> tokens.add(classDataName(relation.getTarget(), "Stored"))); return String.join(", ", tokens); } public static String joinedTokensForApiImport(RelationType relation){ - HashSet tokens = new HashSet<>(); + HashSet tokens = new LinkedHashSet<>(); if (!relation.isIsAccess()) { tokens.add(classDataName((ClassType) relation.getOwner(), "")); @@ -105,7 +103,7 @@ private static void fillImportTokens(HashSet tokens, RelationType target } public static String joinedTokensForApiImportForAccessRelationServiceImpl(RelationType relation){ - HashSet tokens = new HashSet<>(); + HashSet tokens = new LinkedHashSet<>(); if (!relation.isIsAccess()) { tokens.add(classDataName((ClassType) relation.getOwner(), "")); @@ -124,7 +122,7 @@ public static String joinedTokensForApiImportForAccessRelationServiceImpl(Relati } public static String joinedTokensForApiImportClassService(ClassType classType){ - HashSet tokens = new HashSet<>(); + HashSet tokens = new LinkedHashSet<>(); tokens.add(classDataName(classType, "")); tokens.add(classDataName(classType, "Stored"));