Commit f5a40c83ef43a94bcd0223e5a0adc7cbcde4b214
Exists in
master
Merge pull request #28 from rodrigorgs/logout
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
... | ... | @@ -152,7 +152,8 @@ public class SecurityObserver implements Serializable { |
152 | 152 | |
153 | 153 | } finally { |
154 | 154 | try { |
155 | - Beans.getReference(HttpSession.class).invalidate(); | |
155 | + HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); | |
156 | + session.invalidate(); | |
156 | 157 | } catch (IllegalStateException e) { |
157 | 158 | logger.debug("Esta sessão já foi invalidada."); |
158 | 159 | } | ... | ... |