struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Peltzer (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3150) TokenSessionStoreInterceptor fails with NPE when no token is provided.
Date Thu, 04 Jun 2009 15:50:42 GMT
TokenSessionStoreInterceptor fails with NPE when no token is provided.
----------------------------------------------------------------------

                 Key: WW-3150
                 URL: https://issues.apache.org/struts/browse/WW-3150
             Project: Struts 2
          Issue Type: Bug
          Components: Core Interceptors
    Affects Versions: 2.1.6
         Environment: N/A
            Reporter: James Peltzer


TokenSessionStoreInterceptor fails when no token is provided.
java.lang.NullPointerException at java.util.TreeMap.getEntry(Unknown Source) at java.util.TreeMap.get(Unknown
Source) at org.apache.struts2.util.TokenHelper.getToken(TokenHelper.java:101) at org.apache.struts2.interceptor.TokenSessionStoreInterceptor.handleInvalidToken(TokenSessionStoreInterceptor.java:117)
at org.apache.struts2.interceptor.TokenInterceptor.doIntercept(TokenInterceptor.java:141)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

...

It looks like it could be solved if the TokenHelper class checks to make sure it isn't trying
to look up a null token name and just returns null immediately.  


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message