projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove deprecated exception.
[lgpl/argeo-commons.git]
/
org.argeo.cms.e4.rap
/
src
/
org
/
argeo
/
cms
/
e4
/
rap
/
CmsLoginLifecycle.java
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 300c7566b4efcd9f348e2950f9f4160aad23d8bc..12ee3c55e9150fe17ea22a87bd85eb13e3dd9156 100644
(file)
--- 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.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;
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)
@Override
public void authChange(LoginContext loginContext) {
if (loginContext == null)
- throw new
Cms
Exception("Login context cannot be null");
+ throw new
IllegalArgument
Exception("Login context cannot be null");
// logout previous login context
// if (this.loginContext != null)
// try {
// 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)
@Override
public void logout() {
if (loginContext == null)
- throw new
Cms
Exception("Login context should not be null");
+ throw new
IllegalState
Exception("Login context should not be null");
try {
CurrentUser.logoutCmsSession(loginContext.getSubject());
loginContext.logout();
} catch (LoginException e) {
try {
CurrentUser.logoutCmsSession(loginContext.getSubject());
loginContext.logout();
} catch (LoginException e) {
- throw new
Cms
Exception("Cannot log out", e);
+ throw new
IllegalState
Exception("Cannot log out", e);
}
}
}
}