From: Mathieu Baudier Date: Thu, 22 Oct 2020 09:11:15 +0000 (+0200) Subject: Remove deprecated exception. X-Git-Tag: argeo-commons-2.1.89~61 X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=66dd22be4e93fec2554c65710ec5846a2f598c02 Remove deprecated exception. --- diff --git a/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java b/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java index 300c7566b..12ee3c55e 100644 --- a/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java +++ b/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java @@ -10,7 +10,6 @@ import javax.security.auth.login.LoginException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.api.NodeConstants; -import org.argeo.cms.CmsException; import org.argeo.cms.auth.CurrentUser; import org.argeo.cms.ui.CmsImageManager; import org.argeo.cms.ui.CmsView; @@ -114,7 +113,7 @@ public class CmsLoginLifecycle implements CmsView { @Override public void authChange(LoginContext loginContext) { if (loginContext == null) - throw new CmsException("Login context cannot be null"); + throw new IllegalArgumentException("Login context cannot be null"); // logout previous login context // if (this.loginContext != null) // try { @@ -128,12 +127,12 @@ public class CmsLoginLifecycle implements CmsView { @Override public void logout() { if (loginContext == null) - throw new CmsException("Login context should not be null"); + throw new IllegalStateException("Login context should not be null"); try { CurrentUser.logoutCmsSession(loginContext.getSubject()); loginContext.logout(); } catch (LoginException e) { - throw new CmsException("Cannot log out", e); + throw new IllegalStateException("Cannot log out", e); } }