[ 
https://issues.apache.org/struts/browse/WW-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jasper Rosenberg updated WW-1807:
---------------------------------

    Attachment: FreemarkerResult.java.patch

The attached patch just renames the "location" argument to doExecute() so it is 
clear that it is being modified and not the member variable "location"

I can't make do more beyond this because, I can't derive the original intent of 
the author.

I traced back the change history in CVS (in WebWork) to 
https://xwork.dev.java.net/source/browse/webwork/src/java/com/opensymphony/webwork/views/freemarker/FreemarkerResult.java?r1=1.7&r2=1.8

The revision comment by plightbo (22 months ago) was:
"- DWR supports maps correctly
 - added new tutorial section (start of better working docs)
 - made FreeMarker the default UI tag impl
 - refactored common context entries to a single place
 - removed deprecated FreemarkerServlet and WebWorkVelocityServlet"

Which is not very illuminating.  Perhaps you could ask Patrick Lightbody what 
he intended?


> FreemarkerResult location masking
> ---------------------------------
>
>                 Key: WW-1807
>                 URL: https://issues.apache.org/struts/browse/WW-1807
>             Project: Struts 2
>          Issue Type: Task
>          Components: Views
>    Affects Versions: 2.0.6
>            Reporter: Jasper Rosenberg
>            Priority: Minor
>             Fix For: 2.0.8
>
>         Attachments: FreemarkerResult.java.patch
>
>
> FreemarkerResult.doExecute() takes a location parameter.  
> FreemarkerResult also has a location member variable.
> In doExecute(), it first assigns the parameter location to the member 
> variable location.
> It then conditionally alters the value of the parameter location.  It isn't 
> clear if this was the intent or if the intent was to modify the member 
> variable.
> To make things even more confusing, the parent class StrutsResultSupport also 
> has a private location member variable.
> At the very least, it would be helpful if these three "location" variables 
> were given unique names so it could be clear to a reader what the intended 
> behavior is.
> Thanks!

-- 
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