You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Dennis Balkir (JIRA)" <ji...@apache.org> on 2017/08/17 12:28:00 UTC

[jira] [Commented] (OFBIZ-9586) [FB] Package org.apache.ofbiz.base.util.template

    [ https://issues.apache.org/jira/browse/OFBIZ-9586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130321#comment-16130321 ] 

Dennis Balkir commented on OFBIZ-9586:
--------------------------------------

I didn't fix this FB-error.
The code which caused this is:

{noformat}
// FIXME: the casting from Appendable to Writer is a temporary fix that could cause a
//        run time error if in the future we will pass a different class to the method
//        (such as a StringBuffer).
Environment env = template.createProcessingEnvironment(context, (Writer) outWriter);
applyUserSettings(env, context);
env.process();
return env;
{noformat}

I don't know if this is just a theoretical error, or if this can really happen at some time, but maybe somebody can take a look at this and check if there is a possibility of a casting error at this point since at some point somebody has already looked at this and wrote the {{FIXME}} to show, that something has to be done.

> [FB] Package org.apache.ofbiz.base.util.template
> ------------------------------------------------
>
>                 Key: OFBIZ-9586
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9586
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: base
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>
> FreeMarkerWorker.java:210, BC_UNCONFIRMED_CAST, Priorität: Niedrig
> BC: Unchecked/unconfirmed cast from Appendable to java.io.Writer in org.apache.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(Template, Map, Appendable)
> This cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Check that your program logic ensures that this cast will not fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)