[JBoss JIRA] (GTNPC-108) BaseURLImpl.write implementation is incorrect
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNPC-108?page=com.atlassian.jira.plugin.... ]
Chris Laprun updated GTNPC-108:
-------------------------------
Description:
Context: JSR-286 specifies that portlet URLs are now XML encoded by default. BaseURL.write is thus supposed to be functionally equivalent to BaseURL.write(writer, true) but the current implementation is write(writer, false).
Moreover, URLFormat allows users to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
was:Context: JSR-286 specifies that portlet URLs are now XML encoded by default. URLFormat allows user to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
> BaseURLImpl.write implementation is incorrect
> ---------------------------------------------
>
> Key: GTNPC-108
> URL: https://issues.jboss.org/browse/GTNPC-108
> Project: GateIn Portlet Container
> Issue Type: Feature Request
> Affects Versions: 2.4.1.Final
> Reporter: Chris Laprun
> Assignee: Chris Laprun
> Fix For: 2.4.2.Final
>
>
> Context: JSR-286 specifies that portlet URLs are now XML encoded by default. BaseURL.write is thus supposed to be functionally equivalent to BaseURL.write(writer, true) but the current implementation is write(writer, false).
> Moreover, URLFormat allows users to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (GTNPC-108) BaseURLImpl.write implementation is incorrect
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNPC-108?page=com.atlassian.jira.plugin.... ]
Chris Laprun updated GTNPC-108:
-------------------------------
Summary: BaseURLImpl.write implementation is incorrect (was: BaseURLImpl.FORMATS shouldn't use null to indicate false for escapeXML value)
> BaseURLImpl.write implementation is incorrect
> ---------------------------------------------
>
> Key: GTNPC-108
> URL: https://issues.jboss.org/browse/GTNPC-108
> Project: GateIn Portlet Container
> Issue Type: Feature Request
> Affects Versions: 2.4.1.Final
> Reporter: Chris Laprun
> Assignee: Chris Laprun
> Fix For: 2.4.2.Final
>
>
> Context: JSR-286 specifies that portlet URLs are now XML encoded by default. URLFormat allows user to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (GTNPC-108) BaseURLImpl.FORMATS shouldn't use null to indicate false for escapeXML value
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNPC-108?page=com.atlassian.jira.plugin.... ]
Chris Laprun reassigned GTNPC-108:
----------------------------------
Assignee: Chris Laprun
> BaseURLImpl.FORMATS shouldn't use null to indicate false for escapeXML value
> ----------------------------------------------------------------------------
>
> Key: GTNPC-108
> URL: https://issues.jboss.org/browse/GTNPC-108
> Project: GateIn Portlet Container
> Issue Type: Feature Request
> Affects Versions: 2.4.1.Final
> Reporter: Chris Laprun
> Assignee: Chris Laprun
> Fix For: 2.4.2.Final
>
>
> Context: JSR-286 specifies that portlet URLs are now XML encoded by default. URLFormat allows user to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (GTNPC-108) BaseURLImpl.FORMATS shouldn't use null to indicate false for escapeXML value
by Chris Laprun (JIRA)
Chris Laprun created GTNPC-108:
----------------------------------
Summary: BaseURLImpl.FORMATS shouldn't use null to indicate false for escapeXML value
Key: GTNPC-108
URL: https://issues.jboss.org/browse/GTNPC-108
Project: GateIn Portlet Container
Issue Type: Feature Request
Affects Versions: 2.4.1.Final
Reporter: Chris Laprun
Fix For: 2.4.2.Final
Context: JSR-286 specifies that portlet URLs are now XML encoded by default. URLFormat allows user to control how a Portlet URL is rendered, in particular with respect to XML escaping. However, BaseURLImpl uses an internal array (FORMATS) that uses null instead of false to that is passed along when portlets want to *not* XML-escape URLs. Since URLFormat uses a Boolean instead of a boolean and that the default value for escapeXML needs to be true per the spec, using null instead of Boolean.FALSE is confusing because null indicates absence of value which would indicate using whatever the default one is (in this case, true).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months