Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControllerParser has inappropriate code #1

Open
devefx opened this issue Jul 10, 2017 · 4 comments
Open

ControllerParser has inappropriate code #1

devefx opened this issue Jul 10, 2017 · 4 comments

Comments

@devefx
Copy link

devefx commented Jul 10, 2017

inappropriate code

if ("dwr:config-param".equals(child.getNodeName()))
{
    params.put(child.getAttribute("name"), child.getAttribute("value"));
}

correct

if ("config-param".equals(element.getLocalName()))
{
    params.put(child.getAttribute("name"), child.getAttribute("value"));
}
@mikewse
Copy link
Contributor

mikewse commented Jul 10, 2017

Thanks for the report!
@dmarginian : can you take a look at this?

@dmarginian
Copy link
Contributor

dmarginian commented Jul 11, 2017

The use of the dwr namepspace is documented on our site:
http://directwebremoting.org/dwr/documentation/server/integration/spring.html

If we changed this per your recommendation I believe we would break people that read and followed our documentation.

@dmarginian
Copy link
Contributor

dmarginian commented Jul 12, 2017

@devefx I missed the change of getNodeName to getLocalName in the code you submitted. The proposed change could work, however, there are several other places in the code where we are using getNodeName (CreatorParserHelper) and relying on the dwr namespace. So the change is more invasive than just ControllerParser. Also, I would need to investigate using getLocalName as I know in some cases it may return null. I would suggest using the dwr namespace per our documentation for now.

@mikewse
Copy link
Contributor

mikewse commented Jul 31, 2017

@devefx Everybody's busy so it would help a lot if you could describe the use case you want to solve. Some example code that a test case could be based off would also be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants