diff --git a/view/src/main/java/se/su/dsv/scipro/match/SupervisorMyIdeasPanel.java b/view/src/main/java/se/su/dsv/scipro/match/SupervisorMyIdeasPanel.java index cd59b023bf..f59bd4ac49 100755 --- a/view/src/main/java/se/su/dsv/scipro/match/SupervisorMyIdeasPanel.java +++ b/view/src/main/java/se/su/dsv/scipro/match/SupervisorMyIdeasPanel.java @@ -337,29 +337,26 @@ public class SupervisorMyIdeasPanel extends Panel { if (idea.getMatch() == null) { return "-"; } - switch (idea.getMatchStatus()) { - case UNMATCHED: - return getString("status.unmatched"); - case COMPLETED: - return getString("status.completed"); - case INACTIVE: - return getString("status.inactive"); - case MATCHED: + return switch (idea.getMatchStatus()) { + case UNMATCHED -> getString("status.unmatched"); + case COMPLETED -> getString("status.completed"); + case INACTIVE -> getString("status.inactive"); + case MATCHED -> { if (applicationPeriodService.courseStartHasPassed(idea.getApplicationPeriod())) { if (idea.isExported()) { if (idea.wasExportSuccessful()) { - return getString("status.project.created"); + yield getString("status.project.created"); } else { - return getString("status.export.failed"); + yield getString("status.export.failed"); } } else { - return getString("status.awaiting.project.creation"); + yield getString("status.awaiting.project.creation"); } } else { - return getString("status.awaiting.course.start", Model.of(idea.getApplicationPeriod())); + yield getString("status.awaiting.course.start", Model.of(idea.getApplicationPeriod())); } - } - return "-"; // can't happen + } + }; } }; }