[
https://issues.apache.org/jira/browse/MYFACES-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891142#action_12891142
]
Bruno Aranda commented on MYFACES-2835:
---------------------------------------
Diferent quick tests I have done (black box tests):
// USING MOJARRA
///////////////
// The abstract class
// DEFAULT IMPL
ResponseWriter rw = new HtmlResponseWriter(w, "text/html", "UTF-8");
rw.startCDATA();
rw.endCDATA();
Renders:
<![CDATA[]]>
/////////
ResponseWriter rw = new HtmlResponseWriter(w, "text/html", "UTF-8");
rw.startCDATA();
rw.startCDATA();
rw.endCDATA();
rw.endCDATA();
This throws IllegalStateException: CDATA tags may not nest
// CUSTOM IMPL
ResponseWriter cw = new ResponseWriter() {
... empty implementation here ...
};
cw.startCDATA();
cw.endCDATA();
// PARTIAL
ResponseWriter rw = new HtmlResponseWriter(w, "text/html", "UTF-8");
ResponseWriter pw = new PartialResponseWriter(rw);
pw.startCDATA();
pw.startCDATA();
pw.endCDATA();
pw.endCDATA();
This throws IllegalStateException: CDATA tags may not nest
Conclusions (differences between Mojarra and MyFaces)
***************
ResponseWriter:
The endCDATA method in Mojarra throws an UnsupportedOperationException
(undocumented in the javadocs). This shows how the ResponseWriter class has an
empty startCDATA and throws an exception on endCDATA.
HtmlResponseWriterImpl
Apparently we should take care here of nested CDATAs. In Mojarra they throw an
exception if that is the case.
PartialResponseWriterImpl
The same than in the HtmlResponseWriter. An exception is thrown if there are
nested CDATAs.
> ResponseWriter.startCDATA() and endCDATA() methods should take no action
> according to the Javadocs
> --------------------------------------------------------------------------------------------------
>
> Key: MYFACES-2835
> URL: https://issues.apache.org/jira/browse/MYFACES-2835
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-252
> Affects Versions: 2.0.1
> Reporter: Bruno Aranda
> Assignee: Bruno Aranda
> Fix For: 2.0.2-SNAPSHOT
>
>
> Hence, the body of this methods should be empty.
> This is highlighted by a problem with Primefaces, where Mojarra works without
> problems and Myfaces not, because it adds nested CDATA sections, hence
> breaking the custom partial response XML created by Primefaces.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.