1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 02:49:06 +00:00

#1580 Make source code compatible to Java 1.7

This commit is contained in:
Dietrich Travkin 2023-10-30 10:18:27 +01:00
parent f47ca8c339
commit 8b87aa0c1c

View File

@ -534,15 +534,21 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
return null;
}
List<EntityHideOrShow> commands = hideOrShows.stream()
.filter(cmd -> cmd.portion == EntityPortion.STEREOTYPE)
.collect(Collectors.toList());
List<EntityHideOrShow> commands = new ArrayList<>();
for (EntityHideOrShow hideOrShowEntry : hideOrShows) {
if (hideOrShowEntry.portion == EntityPortion.STEREOTYPE) {
commands.add(hideOrShowEntry);
}
}
return entity.getStereotype()
.getLabels(Guillemet.DOUBLE_COMPARATOR)
.stream()
.filter(stereoTypeLabel -> isHiddenStereotypeLabel(stereoTypeLabel, commands))
.collect(Collectors.toList());
List<String> visibleStereotypeLabels = new ArrayList<>();
for (String stereoTypeLabel: entity.getStereotype().getLabels(Guillemet.DOUBLE_COMPARATOR)) {
if (isHiddenStereotypeLabel(stereoTypeLabel, commands)) {
visibleStereotypeLabels.add(stereoTypeLabel);
}
}
return visibleStereotypeLabels;
}
private boolean isHiddenStereotypeLabel(String stereoTypeLabel, List<EntityHideOrShow> commands) {