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 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 |
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimitri Unruh updated OFBIZ-4400: --------------------------------- Attachment: OFBIZ-4400.patch > 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 |
In reply to this post by Nicolas Malin (Jira)
[ 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100445#comment-13100445 ] BJ Freeman commented on OFBIZ-4400: ----------------------------------- I am out of my league here but can be make the UTF-8 a variable that is passed down from the view-map? If it is null then Defualt to UTF-8 > 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100463#comment-13100463 ] Adrian Crum commented on OFBIZ-4400: ------------------------------------ BJ, Please feel free to submit an improved patch. > 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100531#comment-13100531 ] Dimitri Unruh commented on OFBIZ-4400: -------------------------------------- @Adrian: you are right, this is much better... @BJ: +1. If you are busy at the moment I also could create a new patch > 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimitri Unruh updated OFBIZ-4400: --------------------------------- Attachment: OFBIZ-4400.patch Adrian, BJ here is a new try > 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, 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4400. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Assignee: Adrian Crum Thanks Dimitri, Adrian Dimitri, your (slightly modified) patch is in trunk at 1172342 I simply organized imports > 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 > Assignee: Adrian Crum > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4400.patch, 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107532#comment-13107532 ] Jacques Le Roux commented on OFBIZ-4400: ---------------------------------------- I forgot the services.xml file in r1172342, committed at r1172344 > 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 > Assignee: Adrian Crum > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4400.patch, 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 |
Free forum by Nabble | Edit this page |