Commit 4e8252e7b6ebc9ac230017b62c9bbdb0fc7ec1a2
1 parent
7911d59c
Exists in
master
Conserta NPE ao tentar invalidar a sessão após logout.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/SecurityObserver.java
| @@ -161,7 +161,8 @@ public class SecurityObserver implements Serializable { | @@ -161,7 +161,8 @@ public class SecurityObserver implements Serializable { | ||
| 161 | 161 | ||
| 162 | } finally { | 162 | } finally { |
| 163 | try { | 163 | try { |
| 164 | - Beans.getReference(HttpSession.class).invalidate(); | 164 | + HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); |
| 165 | + session.invalidate(); | ||
| 165 | } catch (IllegalStateException e) { | 166 | } catch (IllegalStateException e) { |
| 166 | logger.debug("Esta sessão já foi invalidada."); | 167 | logger.debug("Esta sessão já foi invalidada."); |
| 167 | } | 168 | } |