[jira] [Commented] (WW-4849) ObjectFactory constructor signature change breaks extensions
[ https://issues.apache.org/jira/browse/WW-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16162196#comment-16162196 ] Mitth'raw'nuruodo commented on WW-4849: --- Can I just clarify the answer to my question above? Subclasses of {{ObjectFactory}} no longer need a no-arg constructor, and I can submit a pull request to Guice to sort that out? > ObjectFactory constructor signature change breaks extensions > > > Key: WW-4849 > URL: https://issues.apache.org/jira/browse/WW-4849 > Project: Struts 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.5.13 >Reporter: Mitth'raw'nuruodo > Fix For: 2.5.14 > > > Commit {{6f91d0776a545c911ca4f2875ed9976614711ef9}} changed the signature of > the {{ObjectFactory}} constructor, breaking all classes that extend > {{ObjectFactory}} (as per https://struts.apache.org/docs/objectfactory.html). > This affects eg the [{{guice-servlet}} Struts plugin| > https://github.com/google/guice/blob/master/extensions/struts2/src/com/google/inject/struts2/Struts2Factory.java]. > This was not listed on the [2.5.13 version > notes|https://struts.apache.org/docs/version-notes-2513.html] as a breaking > change, and breaking changes should preferably be avoided in critical > security updates. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4849) ObjectFactory constructor signature change breaks extensions
[ https://issues.apache.org/jira/browse/WW-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161883#comment-16161883 ] Lukasz Lenart commented on WW-4849: --- [~thrawnca] I would ask you to join the discussion here [1] (or I can start a new thread on how to release security fixes). Discussion such things in JIRA isn't the best idea. [1] http://markmail.org/message/ooeedo2lojq5avoj > ObjectFactory constructor signature change breaks extensions > > > Key: WW-4849 > URL: https://issues.apache.org/jira/browse/WW-4849 > Project: Struts 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.5.13 >Reporter: Mitth'raw'nuruodo > Fix For: 2.5.14 > > > Commit {{6f91d0776a545c911ca4f2875ed9976614711ef9}} changed the signature of > the {{ObjectFactory}} constructor, breaking all classes that extend > {{ObjectFactory}} (as per https://struts.apache.org/docs/objectfactory.html). > This affects eg the [{{guice-servlet}} Struts plugin| > https://github.com/google/guice/blob/master/extensions/struts2/src/com/google/inject/struts2/Struts2Factory.java]. > This was not listed on the [2.5.13 version > notes|https://struts.apache.org/docs/version-notes-2513.html] as a breaking > change, and breaking changes should preferably be avoided in critical > security updates. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4034) Allow to use custom JSONwriter
[ https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161846#comment-16161846 ] ASF GitHub Bot commented on WW-4034: Github user yasserzamani commented on the issue: https://github.com/apache/struts/pull/167 I'm in no rush, I just wished to know. thanks for your works 👍 > Allow to use custom JSONwriter > -- > > Key: WW-4034 > URL: https://issues.apache.org/jira/browse/WW-4034 > Project: Struts 2 > Issue Type: Improvement > Components: Plugin - JSON >Reporter: Emir Buğra KÖKSALAN >Priority: Minor > Labels: JSON > Fix For: 2.5.14, 2.6 > > > Throws when accessing to a private inner class in that method: > private void map(Map map, Method method) throws JSONException > May be pass when trying to access a private class. example source code should > be: > {code:java} > private void map(Map map, Method method) throws JSONException { > this.add("{"); > ... > while (it.hasNext()) { > Map.Entry entry = (Map.Entry) it.next(); > Object key = entry.getKey(); > String expr = null; > if (this.buildExpr) { > try { > if (key == null) { > LOG.error("Cannot build expression for null key in " + > this.exprStack); > continue; > } else { > expr = this.expandExpr(key.toString()); > if (this.shouldExcludeProperty(expr)) { > continue; > } > expr = this.setExprStack(expr); > } > } > catch (Exception ex) { > LOG.error("Error: " + ex.getLocalizedMessage()); > continue; > } > } > if (hasData) { > this.add(','); > } > ... > this.add("}"); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4034) Allow to use custom JSONwriter
[ https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161717#comment-16161717 ] ASF GitHub Bot commented on WW-4034: Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/167 I will transit the plugin page and will let you know. Give me few days :) > Allow to use custom JSONwriter > -- > > Key: WW-4034 > URL: https://issues.apache.org/jira/browse/WW-4034 > Project: Struts 2 > Issue Type: Improvement > Components: Plugin - JSON >Reporter: Emir Buğra KÖKSALAN >Priority: Minor > Labels: JSON > Fix For: 2.5.14, 2.6 > > > Throws when accessing to a private inner class in that method: > private void map(Map map, Method method) throws JSONException > May be pass when trying to access a private class. example source code should > be: > {code:java} > private void map(Map map, Method method) throws JSONException { > this.add("{"); > ... > while (it.hasNext()) { > Map.Entry entry = (Map.Entry) it.next(); > Object key = entry.getKey(); > String expr = null; > if (this.buildExpr) { > try { > if (key == null) { > LOG.error("Cannot build expression for null key in " + > this.exprStack); > continue; > } else { > expr = this.expandExpr(key.toString()); > if (this.shouldExcludeProperty(expr)) { > continue; > } > expr = this.setExprStack(expr); > } > } > catch (Exception ex) { > LOG.error("Error: " + ex.getLocalizedMessage()); > continue; > } > } > if (hasData) { > this.add(','); > } > ... > this.add("}"); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4034) Allow to use custom JSONwriter
[ https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161336#comment-16161336 ] ASF GitHub Bot commented on WW-4034: GitHub user yasserzamani opened a pull request: https://github.com/apache/struts/pull/167 WW-4034 Allows to use custom JSONwriter Wow! I really enjoyed this work! thanks to S2's nice design! Just a small query about documenting it please. While documentations are in a middle of transition now and JSON plugin not transited for now, could I create a pull request on struts-site or I should wait for completion of transitions? You can merge this pull request into a Git repository by running: $ git pull https://github.com/yasserzamani/struts WW-4034 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/167.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #167 commit 39bdb99a116080a56242dc33303c4ab6d2b28f8f Author: Yasser Zamani Date: 2017-09-11T13:39:32Z WW-4034 Refactors and extracts interface from JSONWriter commit 5bb472fa8585fddb38767dd4752a50cd5f51ff61 Author: Yasser Zamani Date: 2017-09-11T14:10:34Z WW-4034 Allows to use custom JSONwriter > Allow to use custom JSONwriter > -- > > Key: WW-4034 > URL: https://issues.apache.org/jira/browse/WW-4034 > Project: Struts 2 > Issue Type: Improvement > Components: Plugin - JSON >Reporter: Emir Buğra KÖKSALAN >Priority: Minor > Labels: JSON > Fix For: 2.5.14, 2.6 > > > Throws when accessing to a private inner class in that method: > private void map(Map map, Method method) throws JSONException > May be pass when trying to access a private class. example source code should > be: > {code:java} > private void map(Map map, Method method) throws JSONException { > this.add("{"); > ... > while (it.hasNext()) { > Map.Entry entry = (Map.Entry) it.next(); > Object key = entry.getKey(); > String expr = null; > if (this.buildExpr) { > try { > if (key == null) { > LOG.error("Cannot build expression for null key in " + > this.exprStack); > continue; > } else { > expr = this.expandExpr(key.toString()); > if (this.shouldExcludeProperty(expr)) { > continue; > } > expr = this.setExprStack(expr); > } > } > catch (Exception ex) { > LOG.error("Error: " + ex.getLocalizedMessage()); > continue; > } > } > if (hasData) { > this.add(','); > } > ... > this.add("}"); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4848) The if test can accidently incorrectly assign a new value to an object
[ https://issues.apache.org/jira/browse/WW-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160829#comment-16160829 ] Yasser Zamani commented on WW-4848: --- Thank you. I already stopped as Aleksandr vetoed as an PMC. > The if test can accidently incorrectly assign a new value to an object > -- > > Key: WW-4848 > URL: https://issues.apache.org/jira/browse/WW-4848 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.5.13 >Reporter: Alan Comeau >Priority: Minor > Fix For: 2.5.14 > > > The {{s:if}} tag has the side effect of assigning to an existing object > if the comparison is badly formed using {{=}} instead of {{==}} > {code:html} > > //at this point the user.id is now 0 not its original value > > {code} > even though this is clearly badly formed, the test should not assign anything > to the object -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WW-4848) The if test can accidently incorrectly assign a new value to an object
[ https://issues.apache.org/jira/browse/WW-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160826#comment-16160826 ] Lukasz Lenart commented on WW-4848: --- I would leave it as is. Introducing such special cases can do more harm than good. > The if test can accidently incorrectly assign a new value to an object > -- > > Key: WW-4848 > URL: https://issues.apache.org/jira/browse/WW-4848 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.5.13 >Reporter: Alan Comeau >Priority: Minor > Fix For: 2.5.14 > > > The {{s:if}} tag has the side effect of assigning to an existing object > if the comparison is badly formed using {{=}} instead of {{==}} > {code:html} > > //at this point the user.id is now 0 not its original value > > {code} > even though this is clearly badly formed, the test should not assign anything > to the object -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (WW-4848) The if test can accidently incorrectly assign a new value to an object
[ https://issues.apache.org/jira/browse/WW-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated WW-4848: -- Affects Version/s: 2.5.13 > The if test can accidently incorrectly assign a new value to an object > -- > > Key: WW-4848 > URL: https://issues.apache.org/jira/browse/WW-4848 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.5.13 >Reporter: Alan Comeau >Priority: Minor > Fix For: 2.5.14 > > > The {{s:if}} tag has the side effect of assigning to an existing object > if the comparison is badly formed using {{=}} instead of {{==}} > {code:html} > > //at this point the user.id is now 0 not its original value > > {code} > even though this is clearly badly formed, the test should not assign anything > to the object -- This message was sent by Atlassian JIRA (v6.4.14#64029)