From 6ad3b20ffe3d74d6da7451a086149dea8dedd0de Mon Sep 17 00:00:00 2001 From: Peter Major Date: Mon, 30 Sep 2024 12:54:14 +0100 Subject: [PATCH] Fix error message when there are multiple sign in pages annotated #207 --- .../boot/starter/app/WicketBootSecuredWebApplication.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/app/WicketBootSecuredWebApplication.java b/wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/app/WicketBootSecuredWebApplication.java index 488f0d45..37376eba 100644 --- a/wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/app/WicketBootSecuredWebApplication.java +++ b/wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/app/WicketBootSecuredWebApplication.java @@ -98,12 +98,12 @@ protected Class getWebSessionClass() @Override protected Class getSignInPageClass() { if(classCandidates.getSignInPageCandidates().size() <= 0){ - throw new IllegalStateException("Couln't find sign in page - please annotate the sign in page with @" + WicketSignInPage.class.getName()); + throw new IllegalStateException("Couldn't find sign in page - please annotate the sign in page with @" + WicketSignInPage.class.getName()); } if(classCandidates.getSignInPageCandidates().size() > 1 ){ String message = "Multiple sign in pages found - please annotate exactly one class with @" + WicketSignInPage.class.getName(); message += "\n"; - for(WicketClassCandidate classCandidate : classCandidates.getHomePageCandidates()) { + for (WicketClassCandidate classCandidate : classCandidates.getSignInPageCandidates()) { message += "\t" + classCandidate.getCandidate() + "\n"; } throw new IllegalStateException(message); @@ -117,7 +117,7 @@ protected Class getSignInPageClass() { @Override public Class getHomePage() { if(classCandidates.getHomePageCandidates().size() <= 0){ - throw new IllegalStateException("Couln't find home page - please annotate the home page with @" + WicketHomePage.class.getName()); + throw new IllegalStateException("Couldn't find home page - please annotate the home page with @" + WicketHomePage.class.getName()); } if(classCandidates.getHomePageCandidates().size() > 1 ){ String message = "Multiple home pages found - please annotate exactly one class with @" + WicketHomePage.class.getName(); @@ -155,5 +155,4 @@ public List getConfigurations() { public void setConfigurations(List configurations) { this.configurations = configurations; } - }