
|
If you were logged in you would be able to see more operations.
|
|
|
|
When using the CookieInterceptor and accessing the WebService for the very first time, the very first request fails with an NullPointer-Exception, because there are no cookies present.
After the first request, there is an SessionId-Cookie from Tomcat itself and the error vanishes (normally) ...
The method before(ActionInvocation invocation) accesses the cookies like this:
Cookie cookies[] = request.getCookies();
for (int a = 0; a < cookies.length; a++) {
...
In the case of no Cookies present, the function "request.getCookies()" return null and an NullPointer-Exception is thrown.
The fix is as follows:
Add the following around the for-loop:
if (cookies != null) {
...
}
(I don't know how to create a "CVS-Patch", so s.o. has to put it in there manually ...)
|
|
Description
|
When using the CookieInterceptor and accessing the WebService for the very first time, the very first request fails with an NullPointer-Exception, because there are no cookies present.
After the first request, there is an SessionId-Cookie from Tomcat itself and the error vanishes (normally) ...
The method before(ActionInvocation invocation) accesses the cookies like this:
Cookie cookies[] = request.getCookies();
for (int a = 0; a < cookies.length; a++) {
...
In the case of no Cookies present, the function "request.getCookies()" return null and an NullPointer-Exception is thrown.
The fix is as follows:
Add the following around the for-loop:
if (cookies != null) {
...
}
(I don't know how to create a "CVS-Patch", so s.o. has to put it in there manually ...) |
Show » |
|
Affects Version/s: 2.2.7 (and maybe earlier ones too)