Posted by
Nicolas Malin (Jira) on
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-4400-Minor-code-style-improvement-tp3798876p3799262.html
[
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