[
https://issues.apache.org/jira/browse/OFBIZ-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacopo Cappellato updated OFBIZ-1816:
-------------------------------------
Attachment: writer2appendable.patch
In this patch all the method's signature have been modified from Writer to
Appendable and all the calls to Writer.write have been converted to
Appendable.append
> Conversion from Writer to Appendable for all rendering classes
> --------------------------------------------------------------
>
> Key: OFBIZ-1816
> URL: https://issues.apache.org/jira/browse/OFBIZ-1816
> Project: OFBiz
> Issue Type: Improvement
> Components: content, framework
> Reporter: Jacopo Cappellato
> Priority: Minor
> Attachments: writer2appendable.patch
>
>
> Based on a recent discussion in the dev list, and especially on the comments
> from David Jones and the work done by Adrian Crum, I'm submitting here for
> your review a patch to refactor all the widget rendering methods and some of
> the content and Freemarker rendering classes to use Appendable instead of
> Writer.
> What do you think?
> There is just one place where the code is not very good; in the
> FreeMarkerWorker.renderTemplate (at line 197) I've added a casting from
> Appendable to Writer:
> Environment env = template.createProcessingEnvironment(context,
> (Writer)outWriter);
> This would cause an issue if in the future we will not pass a Writer to that
> method.
> I'm testing this work right now; if there are no objections I am going to
> commit this in the next few days.
> Jacopo
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.