You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Crum (JIRA)" <ji...@apache.org> on 2011/09/08 18:24:09 UTC

[jira] [Commented] (OFBIZ-4400) Minor code style improvement

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

Adrian Crum commented on OFBIZ-4400:
------------------------------------

This could be simplified further:

{code}
Writer writer = new StringWriter();
try {
    FreeMarkerWorker.renderTemplateAtLocation(template, mapWrapper, writer);
    // write it as a Java file
    File file = new File(output);
    FileUtils.writeStringToFile(file, writer.toString(), "UTF-8");
}
catch (Exception e) {
    Debug.logError(e, module);
    return ServiceUtil.returnError("The Outputfile could not be created: " + e.getMessage());
}
return result;
{code}


> Minor code style improvement
> ----------------------------
>
>                 Key: OFBIZ-4400
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4400
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Dimitri Unruh
>            Priority: Minor
>         Attachments: OFBIZ-4400.patch
>
>
> In the createJsLanguageFileMapping service, the catch blocks have assigns to a local variable in a return statement.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira