Commit 876e21bf303fa107c42f8c161a61922bca46aa76
1 parent
1be2d2bc
Exists in
master
Evitando NullPointerException
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/SessionNotAllowedListener.java
... | ... | @@ -91,7 +91,7 @@ public class SessionNotAllowedListener implements ServletContextListener, HttpSe |
91 | 91 | } |
92 | 92 | |
93 | 93 | public void beforeTransactionComplete(@Observes BeforeTransactionComplete event, HttpServletRequest request) { |
94 | - if (!getConfig().isSessionAllowed() && ATTR_VALUE.equals(request.getAttribute(ATTR_NAME))) { | |
94 | + if (!getConfig().isSessionAllowed() && request != null && ATTR_VALUE.equals(request.getAttribute(ATTR_NAME))) { | |
95 | 95 | invalidateSesstion(request); |
96 | 96 | throw new IllegalStateException(getBundle().getString("session-not-allowed")); |
97 | 97 | } | ... | ... |