-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException on DefaultCallbackLogic #22
Comments
Good find, so I will commit a simple fix soon, but until it is released, you can workaround this problem by doing the following: Override public class FixGrizzlySessionStore extends GrizzlySessionStore {
@Override
public void set(JaxRsContext context, String key, Object value) {
if (value == null) {
getSession(context).removeAttribute(key);
} else {
super.set(context, key, value);
}
}
} And use it instead of the original one by setting it on the pac4j Config: config.setSessionStore(new FixGrizzlySessionStore()); And it should be good :) |
I remember some discussion on this kind of issue for the |
@leleuj in this case it is clearly not needed as there is a |
@leleuj also I think it is the context or the session store that should bother with that, not their clients… it's not their problem how things are stored. |
Yes, it was a specific store and thus you need to handle that by yourself... |
ah ok, but it's ok right now, it's fixed. |
jersey-mvc-freemarker 2.25.1
jersey-container-grizzly2-servlet 2.25.1
grizzly-http-servlet 2.3.28
jax-rs-pac4j 2.0.0
pac4j-oauth 2.0.0
https://github.com/pac4j/pac4j/blob/master/pac4j-core/src/main/java/org/pac4j/core/engine/DefaultCallbackLogic.java
Method redirectToOriginallyRequestedUrl
https://github.com/javaee/grizzly/blob/master/modules/http-server/src/main/java/org/glassfish/grizzly/http/server/Session.java
Grizzly SessionStore cache attribute uses ConcurrentHashMap. Null value is denied.
The text was updated successfully, but these errors were encountered: