[ 
https://issues.apache.org/struts/browse/WW-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45138#action_45138
 ] 

Wes Wannemacher commented on WW-2780:
-------------------------------------

James,
I could be reading this wrong, but maybe there is an NPE in 
ServletActionContext.getResult()... The NPE may just be bubbling up to his 
utility method. I would leave it open for now, but change the Fix Version to 
2.1.4.

dapeng.ni,
Can you post the stack trace of the NPE you receive? that would help us to 
track down why this is happening.

> return null, rather than throw NullpointExetion while 
> ServletActionContext.getRequest()
> ---------------------------------------------------------------------------------------
>
>                 Key: WW-2780
>                 URL: https://issues.apache.org/struts/browse/WW-2780
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.1.2
>            Reporter: dapeng.ni
>             Fix For: 2.1.3
>
>
> I use STRUTS in mixed env with other framework.  In 2.0.x ,  I create utility 
> method to get HttpRequest.  It try to get request from 
> ServletActionContext.getRequest(), if it return null, then get from another 
> API.  
> But in 2.1.2,  if request is not from STRUTS,  
> ServletActionContext.getRequest() will throw NullpointException.. It is not 
> good design. as I have to put try-catch even it just simply need a 
> HttpRequest.

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

Reply via email to