[jira] [Comment Edited] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17146017#comment-17146017 ] Pawan Verma edited comment on OFBIZ-11553 at 6/26/20, 5:22 AM: --- Thanks, [~priya.sharma.9362]. It works well for me. Tested with: ./gradlew "ofbiz --test component=accounting --test suitename=invoicetests" Can we convert Debug.logInfo to logInfo() method? But for that, we need to add this method in OFBizTestCase class. I am fine in both approaches. Thanks. was (Author: pawan.verma): Thanks, [~priya.sharma.9362] Can we convert Debug.logInfo to logInfo() method? But for that, we need to add this method in OFBizTestCase class. I am fine in both approaches. Thanks. > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert InvoicePerShipmentTests.xml to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17146017#comment-17146017 ] Pawan Verma commented on OFBIZ-11553: - Thanks, [~priya.sharma.9362] Can we convert Debug.logInfo to logInfo() method? But for that, we need to add this method in OFBizTestCase class. I am fine in both approaches. Thanks. > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert InvoicePerShipmentTests.xml to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [ofbiz-framework] sonarcloud[bot] commented on pull request #208: Improved: Convert InvoicePerShipmentTests.xml tests to groovy (OFBIZ-11553)
sonarcloud[bot] commented on pull request #208: URL: https://github.com/apache/ofbiz-framework/pull/208#issuecomment-649969383 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=208=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=208) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=208=new_duplicated_lines_density=list) [6.7% Duplication](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=208=new_duplicated_lines_density=list) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17146013#comment-17146013 ] Priya Sharma commented on OFBIZ-11553: -- Yes Pawan, that's right. But since all these cases had very little differences, thus I proposed to do it at once. Also, that made testing easier for me. Meanwhile, I have created a PR for this. Please review and let me know if any changes or improvements can be made. > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert InvoicePerShipmentTests.xml to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [ofbiz-framework] priyasharma1 opened a new pull request #208: Improved: Convert InvoicePerShipmentTests.xml tests to groovy (OFBIZ-11553)
priyasharma1 opened a new pull request #208: URL: https://github.com/apache/ofbiz-framework/pull/208 (OFBIZ-11553) Done following: - converted all XML test implementation to groovy - used MockHttpServletRequest MockHttpServletResponse objects for triggering the events - removed the XML version of the test implementations - updated the test service mapping in the invoicetests.xml Explanation: Since all the test-cases were similar we have combined OFBIZ-11554, OFBIZ-11555, OFBIZ-11556 also. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17145789#comment-17145789 ] Jacques Le Roux commented on OFBIZ-11827: - It depends of 2 factors IMO: # Very big patches # Complexity Here the patches are big but not that much, and the complexity is low, so they are OK with me as is. > Merge identical catch blocks in single catch block > --- > > Key: OFBIZ-11827 > URL: https://issues.apache.org/jira/browse/OFBIZ-11827 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Pawan Verma >Assignee: Pawan Verma >Priority: Minor > Attachments: OFBIZ-11827-plugins.patch, OFBIZ-11827.patch > > > In Java SE 7 and later, a single catch block can handle more than one type of > exception. This feature can reduce code duplication and lessen the temptation > to catch an overly broad exception. > For more details: > https://docs.oracle.com/javase/8/docs/technotes/guides/language/catch-multiple.html > Example: > {code:java} > catch (IOException ex) { > logger.log(ex); > throw ex; > } catch (SQLException ex) { > logger.log(ex); > throw ex; > }{code} > Can be written as, which is valid in Java SE 7 and later, eliminates the > duplicated code: > > {code:java} > catch (IOException | SQLException ex) { > logger.log(ex); > throw ex; > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17145694#comment-17145694 ] Pawan Verma edited comment on OFBIZ-11827 at 6/25/20, 5:46 PM: --- [~jleroux] What I was thinking, Should we break down big patches into component-wise subtasks, this will create some managing burden but definitely improve our review process, Or continue doing it as we are doing now, WDYT? was (Author: pawan.verma): [~jleroux] What I was thinking, Should we break down big patches into component-wise subtasks, this will create some managing burden but definately improve our review process, WDYT? > Merge identical catch blocks in single catch block > --- > > Key: OFBIZ-11827 > URL: https://issues.apache.org/jira/browse/OFBIZ-11827 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Pawan Verma >Assignee: Pawan Verma >Priority: Minor > Attachments: OFBIZ-11827-plugins.patch, OFBIZ-11827.patch > > > In Java SE 7 and later, a single catch block can handle more than one type of > exception. This feature can reduce code duplication and lessen the temptation > to catch an overly broad exception. > For more details: > https://docs.oracle.com/javase/8/docs/technotes/guides/language/catch-multiple.html > Example: > {code:java} > catch (IOException ex) { > logger.log(ex); > throw ex; > } catch (SQLException ex) { > logger.log(ex); > throw ex; > }{code} > Can be written as, which is valid in Java SE 7 and later, eliminates the > duplicated code: > > {code:java} > catch (IOException | SQLException ex) { > logger.log(ex); > throw ex; > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17145694#comment-17145694 ] Pawan Verma commented on OFBIZ-11827: - [~jleroux] What I was thinking, Should we break down big patches into component-wise subtasks, this will create some managing burden but definately improve our review process, WDYT? > Merge identical catch blocks in single catch block > --- > > Key: OFBIZ-11827 > URL: https://issues.apache.org/jira/browse/OFBIZ-11827 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Pawan Verma >Assignee: Pawan Verma >Priority: Minor > Attachments: OFBIZ-11827-plugins.patch, OFBIZ-11827.patch > > > In Java SE 7 and later, a single catch block can handle more than one type of > exception. This feature can reduce code duplication and lessen the temptation > to catch an overly broad exception. > For more details: > https://docs.oracle.com/javase/8/docs/technotes/guides/language/catch-multiple.html > Example: > {code:java} > catch (IOException ex) { > logger.log(ex); > throw ex; > } catch (SQLException ex) { > logger.log(ex); > throw ex; > }{code} > Can be written as, which is valid in Java SE 7 and later, eliminates the > duplicated code: > > {code:java} > catch (IOException | SQLException ex) { > logger.log(ex); > throw ex; > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144869#comment-17144869 ] Pawan Verma commented on OFBIZ-11553: - Hi [~priya.sharma.9362] I think the idea behind single ticket per test case was that more developers can work on parallelly and we get maximum output. Yes, I see no issue with a single patch/PR for multiple test cases. Just include ticket id in the commit message. HTH! > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert InvoicePerShipmentTests.xml to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Priya Sharma updated OFBIZ-11553: - Description: Convert InvoicePerShipmentTests.xml to Groovy (was: Convert testInvoicePerShipmentSetFalse test from XML to Groovy) > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert InvoicePerShipmentTests.xml to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml from XML to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Priya Sharma updated OFBIZ-11553: - Summary: Convert InvoicePerShipmentTests.xml from XML to Groovy (was: Convert from XML to Groovy) > Convert InvoicePerShipmentTests.xml from XML to Groovy > --- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Priya Sharma updated OFBIZ-11553: - Summary: Convert InvoicePerShipmentTests.xml to Groovy (was: Convert InvoicePerShipmentTests.xml from XML to Groovy) > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OFBIZ-11553) Convert from XML to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Priya Sharma updated OFBIZ-11553: - Summary: Convert from XML to Groovy (was: Convert testInvoicePerShipmentSetFalse test from XML to Groovy) > Convert from XML to Groovy > --- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (OFBIZ-11553) Convert InvoicePerShipmentTests.xml to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144859#comment-17144859 ] Priya Sharma edited comment on OFBIZ-11553 at 6/25/20, 11:37 AM: - Thanks, Jacques. The tickets that will be affected are - https://issues.apache.org/jira/browse/OFBIZ-11554 https://issues.apache.org/jira/browse/OFBIZ-11555 https://issues.apache.org/jira/browse/OFBIZ-11556 I will be making a single PR to cover all these tests. Also updated the ticket title and the summary. was (Author: priya.sharma.9362): Thanks, Jacques. The tickets that will be affected are - https://issues.apache.org/jira/browse/OFBIZ-11554 https://issues.apache.org/jira/browse/OFBIZ-11555 https://issues.apache.org/jira/browse/OFBIZ-11556 I will be making a single PR to cover all these tests. > Convert InvoicePerShipmentTests.xml to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11553) Convert testInvoicePerShipmentSetFalse test from XML to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144859#comment-17144859 ] Priya Sharma commented on OFBIZ-11553: -- Thanks, Jacques. The tickets that will be affected are - https://issues.apache.org/jira/browse/OFBIZ-11554 https://issues.apache.org/jira/browse/OFBIZ-11555 https://issues.apache.org/jira/browse/OFBIZ-11556 I will be making a single PR to cover all these tests. > Convert testInvoicePerShipmentSetFalse test from XML to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (OFBIZ-11836) IDOR vulnerability in the order processing feature
[ https://issues.apache.org/jira/browse/OFBIZ-11836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-11836: --- Assignee: Jacques Le Roux > IDOR vulnerability in the order processing feature > -- > > Key: OFBIZ-11836 > URL: https://issues.apache.org/jira/browse/OFBIZ-11836 > Project: OFBiz > Issue Type: Sub-task > Components: ecommerce, order >Affects Versions: Trunk >Reporter: Jacques Le Roux >Assignee: Jacques Le Roux >Priority: Major > > Harshit Shukla [mailto:harshit.sh...@gmail.com]reported this IDOR > vulnerability to the OFBiz security team, and we thank him for that. > I'll later quote here his email message when the vulnerability will be fixed. > It's a post-auth vulnerability so we did not ask for a CVE. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [ofbiz-plugins] sonarcloud[bot] removed a comment on pull request #33: Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
sonarcloud[bot] removed a comment on pull request #33: URL: https://github.com/apache/ofbiz-plugins/pull/33#issuecomment-648044152 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33=new_duplicated_lines_density=list) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ofbiz-plugins] sonarcloud[bot] commented on pull request #33: Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
sonarcloud[bot] commented on pull request #33: URL: https://github.com/apache/ofbiz-plugins/pull/33#issuecomment-649479271 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins=33=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins=33=new_duplicated_lines_density=list) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ofbiz-plugins] priyasharma1 commented on a change in pull request #33: Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
priyasharma1 commented on a change in pull request #33: URL: https://github.com/apache/ofbiz-plugins/pull/33#discussion_r445486026 ## File path: bi/groovyScripts/DimensionServices.groovy ## @@ -87,7 +87,7 @@ def loadCurrencyDimension() { currencyDim.store() } } else { -currencyDim = delegator.makeValue("CurrencyDimension",["dimensionId":currency.uomId]) +currencyDim = makeValue("CurrencyDimension",["dimensionId":currency.uomId]) Review comment: Thanks @nmalin This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144847#comment-17144847 ] Pawan Verma commented on OFBIZ-11827: - Thanks, [~jleroux] for the review. Maybe my recent changes related to other Java improvements caused this hunk to fail. Yes, It's okay to have a cursory review. I'll try this hunks when I commit :) > Merge identical catch blocks in single catch block > --- > > Key: OFBIZ-11827 > URL: https://issues.apache.org/jira/browse/OFBIZ-11827 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Pawan Verma >Assignee: Pawan Verma >Priority: Minor > Attachments: OFBIZ-11827-plugins.patch, OFBIZ-11827.patch > > > In Java SE 7 and later, a single catch block can handle more than one type of > exception. This feature can reduce code duplication and lessen the temptation > to catch an overly broad exception. > For more details: > https://docs.oracle.com/javase/8/docs/technotes/guides/language/catch-multiple.html > Example: > {code:java} > catch (IOException ex) { > logger.log(ex); > throw ex; > } catch (SQLException ex) { > logger.log(ex); > throw ex; > }{code} > Can be written as, which is valid in Java SE 7 and later, eliminates the > duplicated code: > > {code:java} > catch (IOException | SQLException ex) { > logger.log(ex); > throw ex; > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11553) Convert testInvoicePerShipmentSetFalse test from XML to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144844#comment-17144844 ] Jacques Le Roux commented on OFBIZ-11553: - Hi Priya, Good idea! > Convert testInvoicePerShipmentSetFalse test from XML to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144842#comment-17144842 ] Jacques Le Roux edited comment on OFBIZ-11827 at 6/25/20, 11:08 AM: Hi Pawan, I did a complete review up to half of the patch, then a cusory review, sounds good to me. Is that OK (did not check more)? {noformat} --- applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java +++ applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java @@ -811,8 +811,6 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data MacroFormRenderer renderer = new MacroFormRenderer(formrenderer, request, response); FormRenderer formRenderer = new FormRenderer(modelForm, renderer); formRenderer.render(out, context); -} catch (SAXException | ParserConfigurationException e) { -throw new GeneralException("Error rendering Screen template", e); } catch (TemplateException e) { throw new GeneralException("Error creating Screen renderer", e); } catch (Exception e) { {noformat} Also I got 3 hunks rejected: EntitySyncServices.java.rej {noformat} @@ -565,14 +559,13 @@ // store the value(s) Map storeResult = dispatcher.runSync("storeEntitySyncData", storeContext); if (ServiceUtil.isError(storeResult)) { -throw new Exception(ServiceUtil.getErrorMessage(storeResult)); +throw new GenericServiceException(ServiceUtil.getErrorMessage(storeResult)); } // TODO create a response document to send back to the initial sync machine -} catch (GenericServiceException gse) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument", UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", gse.getMessage()), locale)); -} catch (Exception e) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument", UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", e.getMessage()), locale)); +} catch (GenericServiceException | IOException | ParserConfigurationException | SAXException | SerializeException gse) { +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument" +, UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", gse.getMessage()), locale)); } } } {noformat} WebToolsServices.java.rej {noformat} @@ -197,8 +197,6 @@ } } catch (GenericServiceException gsex) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityImportParsingError", UtilMisc.toMap("errorString", gsex.getMessage()), locale)); -} catch (Exception ex) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityImportParsingError", UtilMisc.toMap("errorString", ex.getMessage()), locale)); } } else { messages.add(UtilProperties.getMessage(resource, "EntityImportNoXmlFileSpecified", locale)); {noformat} Update to trunk HEAD should do it, I guess was (Author: jacques.le.roux): Hi Pawan, I did a complete review up to half of the patch, then a cusory review, sounds good to me. Is that OK (did not check more)? {noformat} --- applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java +++ applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java @@ -811,8 +811,6 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data MacroFormRenderer renderer = new MacroFormRenderer(formrenderer, request, response); FormRenderer formRenderer = new FormRenderer(modelForm, renderer); formRenderer.render(out, context); -} catch (SAXException | ParserConfigurationException e) { -throw new GeneralException("Error rendering Screen template", e); } catch (TemplateException e) { throw new GeneralException("Error creating Screen renderer", e); } catch (Exception e) { {noformat} Also I got 3 hunks rejected: EntitySyncServices.java.rej {noformat} @@ -565,14 +559,13 @@ // store the value(s)
[jira] [Commented] (OFBIZ-11827) Merge identical catch blocks in single catch block
[ https://issues.apache.org/jira/browse/OFBIZ-11827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144842#comment-17144842 ] Jacques Le Roux commented on OFBIZ-11827: - Hi Pawan, I did a complete review up to half of the patch, then a cusory review, sounds good to me. Is that OK (did not check more)? {noformat} --- applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java +++ applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java @@ -811,8 +811,6 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data MacroFormRenderer renderer = new MacroFormRenderer(formrenderer, request, response); FormRenderer formRenderer = new FormRenderer(modelForm, renderer); formRenderer.render(out, context); -} catch (SAXException | ParserConfigurationException e) { -throw new GeneralException("Error rendering Screen template", e); } catch (TemplateException e) { throw new GeneralException("Error creating Screen renderer", e); } catch (Exception e) { {noformat} Also I got 3 hunks rejected: EntitySyncServices.java.rej {noformat} @@ -565,14 +559,13 @@ // store the value(s) Map storeResult = dispatcher.runSync("storeEntitySyncData", storeContext); if (ServiceUtil.isError(storeResult)) { -throw new Exception(ServiceUtil.getErrorMessage(storeResult)); +throw new GenericServiceException(ServiceUtil.getErrorMessage(storeResult)); } // TODO create a response document to send back to the initial sync machine -} catch (GenericServiceException gse) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument", UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", gse.getMessage()), locale)); -} catch (Exception e) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument", UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", e.getMessage()), locale)); +} catch (GenericServiceException | IOException | ParserConfigurationException | SAXException | SerializeException gse) { +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityExtUnableToLoadXMLDocument" +, UtilMisc.toMap("entitySyncId", entitySyncId, "startTime", startTime, "errorString", gse.getMessage()), locale)); } } } WebToolsServices.java.rej {noformat} @@ -197,8 +197,6 @@ } } catch (GenericServiceException gsex) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityImportParsingError", UtilMisc.toMap("errorString", gsex.getMessage()), locale)); -} catch (Exception ex) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EntityImportParsingError", UtilMisc.toMap("errorString", ex.getMessage()), locale)); } } else { messages.add(UtilProperties.getMessage(resource, "EntityImportNoXmlFileSpecified", locale)); {noformat} Update to trunk HEAD should do it, I guess > Merge identical catch blocks in single catch block > --- > > Key: OFBIZ-11827 > URL: https://issues.apache.org/jira/browse/OFBIZ-11827 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Pawan Verma >Assignee: Pawan Verma >Priority: Minor > Attachments: OFBIZ-11827-plugins.patch, OFBIZ-11827.patch > > > In Java SE 7 and later, a single catch block can handle more than one type of > exception. This feature can reduce code duplication and lessen the temptation > to catch an overly broad exception. > For more details: > https://docs.oracle.com/javase/8/docs/technotes/guides/language/catch-multiple.html > Example: > {code:java} > catch (IOException ex) { > logger.log(ex); > throw ex; > } catch (SQLException ex) { > logger.log(ex); > throw ex; > }{code} > Can be written as, which is valid in Java SE 7 and later, eliminates the > duplicated code: > > {code:java} > catch (IOException | SQLException ex) { > logger.log(ex); > throw ex; > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [ofbiz-plugins] nmalin commented on a change in pull request #33: Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
nmalin commented on a change in pull request #33: URL: https://github.com/apache/ofbiz-plugins/pull/33#discussion_r445428131 ## File path: bi/groovyScripts/DimensionServices.groovy ## @@ -87,7 +87,7 @@ def loadCurrencyDimension() { currencyDim.store() } } else { -currencyDim = delegator.makeValue("CurrencyDimension",["dimensionId":currency.uomId]) +currencyDim = makeValue("CurrencyDimension",["dimensionId":currency.uomId]) Review comment: ```suggestion currencyDim = makeValue("CurrencyDimension", [dimensionId: currency.uomId]) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (OFBIZ-11553) Convert testInvoicePerShipmentSetFalse test from XML to Groovy
[ https://issues.apache.org/jira/browse/OFBIZ-11553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144783#comment-17144783 ] Priya Sharma commented on OFBIZ-11553: -- Hello all, Can we convert all the tests in this file (InvoicePerShipmentTests) on one PR as they are mostly the same with some minute differences? Also, we will not be able to merge it individually as the test-mapping cannot be disturbed until all the methods are converted. Please let me your views, will create a PR if it is agreeable. > Convert testInvoicePerShipmentSetFalse test from XML to Groovy > -- > > Key: OFBIZ-11553 > URL: https://issues.apache.org/jira/browse/OFBIZ-11553 > Project: OFBiz > Issue Type: Sub-task > Components: accounting >Affects Versions: Trunk >Reporter: Rohit Hukkeri >Assignee: Priya Sharma >Priority: Minor > > Convert testInvoicePerShipmentSetFalse test from XML to Groovy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-6042) Allow inventory transfers based on Product instead of only InventoryItem
[ https://issues.apache.org/jira/browse/OFBIZ-6042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17144766#comment-17144766 ] ASF subversion and git services commented on OFBIZ-6042: Commit 2c85c8e43b63b0522f69b7078eec48f3e50824d5 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2c85c8e ] Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042) Fixes a typo > Allow inventory transfers based on Product instead of only InventoryItem > > > Key: OFBIZ-6042 > URL: https://issues.apache.org/jira/browse/OFBIZ-6042 > Project: OFBiz > Issue Type: Improvement > Components: product >Affects Versions: Trunk >Reporter: Christian Carlow >Assignee: Suraj Khurana >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-6042-reopen.patch, OFBIZ-6042.patch, > OFBIZ-6042.patch > > > Stock moves takes productId as a parameter and finds all inventoryItems of > that product until the move quantity is met. InventoryTransfers should > support simliar auto-finding of inventoryItems so that 100 inventoryItems > with quantityOnHand = 1 don't have to be individually manually transferred to > meet the overall move of 100 for the product. -- This message was sent by Atlassian Jira (v8.3.4#803005)