You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/04/18 23:19:49 UTC
DO NOT REPLY [Bug 8277] New: -
org.apache.cocoon.environment.http.HttpRequest.decode nullpointer excetion
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8277>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8277
org.apache.cocoon.environment.http.HttpRequest.decode nullpointer excetion
Summary: org.apache.cocoon.environment.http.HttpRequest.decode
nullpointer excetion
Product: Cocoon 2
Version: 2.0.2
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: core
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: mauch@imkenberg.de
I set encodeing of the request to utf-8 using:
ObjectModelHelper.getRequest(map).setCharacterEncoding("utf-8");
if i try to retrive a empty parameter i go a nullpointer exception:
java.lang.NullPointerException
<kabir> at org.apache.cocoon.environment.http.HttpRequest.decode
(HttpRequest.java:300)
<kabir> at org.apache.cocoon.environment.http.HttpRequest.getParameter
(HttpRequest.java:293
I found a problem in:
org.apache.cocoon.environment.http.HttpRequest.decode
the str parameter is not checked for the null value, so the line
byte[] bytes = str.getBytes(this.container_encoding);
produces the exception.
A possible solution is to add as first line:
if(str== null) return null;
and everything works fine
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org