[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17170534#comment-17170534 ] Devanshu Vyas commented on OFBIZ-9254: -- Thanks Pawan and Jacques. I have created a new [ticket|https://issues.apache.org/jira/browse/OFBIZ-11929] for the remaining points of this ticket. We can also continue our discussion on the other type of comparisons on that one. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Pawan Verma >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167853#comment-17167853 ] Jacques Le Roux commented on OFBIZ-9254: bq. Jacques Le Roux Lets create a new ticket for the number of constant changes so that we can have a proper review +1 > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Pawan Verma >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167836#comment-17167836 ] ASF subversion and git services commented on OFBIZ-9254: Commit b7ef54d494e0c05d9ea8e1a013df3690f60696a4 in ofbiz-plugins's branch refs/heads/trunk from Pawan Verma [ https://gitbox.apache.org/repos/asf?p=ofbiz-plugins.git;h=b7ef54d ] Improved: Inconsistent String Comparisons(OFBIZ-9254) There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL. Thanks: Devanshu for your contribution. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Pawan Verma >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167835#comment-17167835 ] ASF subversion and git services commented on OFBIZ-9254: Commit 034e03abf47b10c94b365357f9ed91bcba1251c4 in ofbiz-framework's branch refs/heads/trunk from Pawan Verma [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=034e03a ] Improved: Inconsistent String Comparisons(OFBIZ-9254) There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL. Thanks: Devanshu for your contribution. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Pawan Verma >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167829#comment-17167829 ] Pawan Verma commented on OFBIZ-9254: Sure, [~jleroux] On it. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Pawan Verma >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167617#comment-17167617 ] Devanshu Vyas commented on OFBIZ-9254: -- Yes, the last 2 patches which I added in May are pending. I think we should reopen it and commit them. Any other improvements or points can be later covered in a new ticket. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167308#comment-17167308 ] Pawan Verma commented on OFBIZ-9254: Hi [~jleroux] [~devanshu.vyas] I think we missed to commit the latest patch that corporates changes related to this ticket i.e. [^OFBIZ-9254_plugins.patch] [^OFBIZ-9254.patch] Shouldn't we reopen and handle this? > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Fix For: 18.12.01, 17.12.05 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165680#comment-17165680 ] ASF subversion and git services commented on OFBIZ-9254: Commit 070297b3a1124572116526e969871e3ba8ab904b in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=070297b ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug Conflicts handled by hand > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165679#comment-17165679 ] ASF subversion and git services commented on OFBIZ-9254: Commit 95d3aadcb5f34c98741f7ac877b893fd75044f5b in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=95d3aad ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug Conflicts handled by hand > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165677#comment-17165677 ] ASF subversion and git services commented on OFBIZ-9254: Commit 95d3aadcb5f34c98741f7ac877b893fd75044f5b in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=95d3aad ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug Conflicts handled by hand > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165682#comment-17165682 ] ASF subversion and git services commented on OFBIZ-9254: Commit 070297b3a1124572116526e969871e3ba8ab904b in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=070297b ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug Conflicts handled by hand > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165625#comment-17165625 ] ASF subversion and git services commented on OFBIZ-9254: Commit 03081897c6889eb5c48d14673eea735bf6daf055 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=0308189 ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165623#comment-17165623 ] ASF subversion and git services commented on OFBIZ-9254: Commit 03081897c6889eb5c48d14673eea735bf6daf055 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=0308189 ] Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834) Changes made in startsWith and indexOf methods in ContentManagementServices for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened. I added a comment to make clear why we have 2 empty else if I'll backport later, conflicts to handle by hand... Thanks: Ankush Upadhyay for spotting the bug > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Jacques Le Roux >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165486#comment-17165486 ] Jacques Le Roux commented on OFBIZ-9254: BTW, just realized that {{} else if (dataResourceTypeId.indexOf("_FILE") >= 0) {}} is not the last else if. So the 2 else if I spoke about above make sense. We dont' want them to be catched by the last else if. I'll put a comment... > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165480#comment-17165480 ] Jacques Le Roux commented on OFBIZ-9254: Don't feel bad Devanshu, happens to all of us ;). I'll take care of it... > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165421#comment-17165421 ] Devanshu Vyas commented on OFBIZ-9254: -- I feel bad for mistakenly breaking the startsWith method in the ContentManagementServices class. I also checked that similar mistakes were done only in ContentManagementServices. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165178#comment-17165178 ] Jacques Le Roux commented on OFBIZ-9254: Thanks Ankush, In 1st place I wonder why we had: {code:java} } else if (dataResourceTypeId.equals("SHORT_TEXT")) { } else if (dataResourceTypeId.startsWith("SURVEY")) { } else if (dataResourceTypeId.indexOf("_FILE") >=0) { Map uploadImage = new HashMap(); {code} The 1st two "if" were useless (doing nothing). We should remove the changed ones. We could argue that they will be useful in future, but then better to add them in this hypotetical future. I looked for {{".startsWith}} and {{".indexOf(}} in all Java files and found them respectively only in ContentManagementServices and ContentManagementServices + ContentWorker.java (from pre Apache era, not related to this issue). So with my suggested changes your concern could be put away. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17164818#comment-17164818 ] Ankush Upadhyay commented on OFBIZ-9254: [~devanshu.vyas], Due to this ticket efforts, OFBIZ-10834 issue occurs because of changes made in *startsWith* and *indexOf* methods in ContentManagementServices.java file. We should look for other places as well to fix all hidden/visible issues due to this change. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099520#comment-17099520 ] Devanshu Vyas commented on OFBIZ-9254: -- Thanks [~jleroux], [~pierresmits]. I will update the patches and add here. Along with those, I found some more string comparisons and I would include those as well here. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098836#comment-17098836 ] Jacques Le Roux commented on OFBIZ-9254: Hi Pierre, I agree, that could be another step, since we already reviewed the current patch, easier for everybody > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098294#comment-17098294 ] Pierre Smits commented on OFBIZ-9254: - I see a lot of the following kinds of string comparisons (even in patch files here) in the code: {code:java} if(" == FOO {code} like {code:java} if ("ewayResponse" == name) {code} Would it not be better to have all those changed to: {code:java} If(" Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098279#comment-17098279 ] Jacques Le Roux commented on OFBIZ-9254: +1 good for commit > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098244#comment-17098244 ] Suraj Khurana commented on OFBIZ-9254: -- Thanks Devanshu, Both the recently added patches looks good to me. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097987#comment-17097987 ] Devanshu Vyas commented on OFBIZ-9254: -- I have prepared 2 patches, one for the ofbiz-framework and other for plugins. Please have a look at the patch and let me know if this looks good. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins.patch, > OFBIZ-9254_plugins_groovy.patch, OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17028507#comment-17028507 ] Devanshu Vyas commented on OFBIZ-9254: -- I forgot to pick it up and complete it. Thanks [~mbrohl] for reminding. I will analyse what part is missing and then will post here the updates. Then I will pick it up finish it ASAP. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Fix For: 17.12.01 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027584#comment-17027584 ] Michael Brohl commented on OFBIZ-9254: -- [~devanshu.vyas], [~deepak] how do you plan to go on with this issue? It's currently assigned to the 17.12 branch and we are working on getting things done to be able to release it. Thanks for your feedback. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Fix For: 17.12.01 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16759367#comment-16759367 ] Deepak Dixit commented on OFBIZ-9254: - [~devanshu.vyas], Any update on this? > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Devanshu Vyas >Priority: Minor > Fix For: 17.12.01 > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205842#comment-16205842 ] Nicolas Malin commented on OFBIZ-9254: -- thanks for this tasks guys > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205786#comment-16205786 ] Jacques Le Roux commented on OFBIZ-9254: Thanks a bunch Deepak, must have been quite a review! > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205781#comment-16205781 ] Deepak Dixit commented on OFBIZ-9254: - Thanks Devanshu for your contribution. Remaining patches has been committed at following revisions 1812255, 1812256, 1812257, 1812259, 1812260, 1812262,1812264, 1812279 and 1812282 > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16079101#comment-16079101 ] Arun Patidar commented on OFBIZ-9254: - OFBIZ-9254_FTL-I.patch :- Committed revision 1801268 OFBIZ-9254_ftl_themes.patch :- Committed revision 1801278 OFBIZ-9254_ftl_product.patch: -Committed revision 1801280 > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_accounting.patch, OFBIZ-9254_java_base.patch, > OFBIZ-9254_java_content.patch, OFBIZ-9254_java_entity.patch, > OFBIZ-9254_java_order.patch, OFBIZ-9254_java_Party_WE_MFC.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16079052#comment-16079052 ] Arun Patidar commented on OFBIZ-9254: - Thanks Devanshu. I am going to start reviewing and committing patches one by one. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9251_ftl_accounting.patch, > OFBIZ-9251_ftl_framework.patch, OFBIZ-9251_ftl_manuf_workeffrt.patch, > OFBIZ-9251_ftl_order.patch, OFBIZ-9251_ftl_party_content.patch, > OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch, > OFBIZ-9251_ftl_plugins_ecommerce.patch, > OFBIZ-9251_ftl_plugins_pricat_projmgr.patch, OFBIZ-9251_ftl_product.patch, > OFBIZ-9251_ftl_themes.patch, OFBIZ-9254_FTL-I.patch, > OFBIZ-9254_groovy_applications.patch, OFBIZ-9254_groovy_framework.patch, > OFBIZ-9254_java_accounting.patch, OFBIZ-9254_java_base.patch, > OFBIZ-9254_java_content.patch, OFBIZ-9254_java_entity.patch, > OFBIZ-9254_java_order.patch, OFBIZ-9254_java_Party_WE_MFC.patch, > OFBIZ-9254_java_product.patch, OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16012752#comment-16012752 ] Deepak Dixit commented on OFBIZ-9254: - OFBIZ-9254_groovy_applications.patch has been committed at ofbiz-framework trunk at r#1795341 > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9254_groovy_applications.patch, > OFBIZ-9254_groovy_framework.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_product.patch, > OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988537#comment-15988537 ] Devanshu Vyas commented on OFBIZ-9254: -- Thanks Jacques! Removed the large patch files to avoid confusion. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9254_groovy_applications.patch, > OFBIZ-9254_groovy_framework.patch, OFBIZ-9254_java_accounting.patch, > OFBIZ-9254_java_base.patch, OFBIZ-9254_java_content.patch, > OFBIZ-9254_java_entity.patch, OFBIZ-9254_java_order.patch, > OFBIZ-9254_java_Party_WE_MFC.patch, OFBIZ-9254_java_product.patch, > OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988527#comment-15988527 ] Jacques Le Roux commented on OFBIZ-9254: Thanks Devanshu, I suggest we drop the big file, to avoid confusion ;) I let you decide when... > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9254_groovy_applications.patch, > OFBIZ-9254_groovy_framework.patch, OFBIZ-9254_groovy.patch, > OFBIZ-9254_java_accounting.patch, OFBIZ-9254_java_base.patch, > OFBIZ-9254_java_content.patch, OFBIZ-9254_java_entity.patch, > OFBIZ-9254_java_order.patch, OFBIZ-9254_java_Party_WE_MFC.patch, > OFBIZ-9254_java.patch, OFBIZ-9254_java_product.patch, > OFBIZ-9254_java_service.patch, > OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch, > OFBIZ-9254_java_webapp.patch, OFBIZ-9254_java_webtools.patch, > OFBIZ-9254_java_widget.patch, OFBIZ-9254_plugins_groovy.patch, > OFBIZ-9254_plugins_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979871#comment-15979871 ] Jacques Le Roux commented on OFBIZ-9254: Hi Devanshu, Yes best way to handle it indeed, notably because it allows several people to work on it. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Assignee: Deepak Dixit >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978347#comment-15978347 ] Devanshu Vyas commented on OFBIZ-9254: -- Thanks Jacques, for your courageous efforts!! The patch file is really large... And Thanks Deepak, for the suggestion and appreciate your help here. I think I can break the patch at the component levels and then it will easy for you all to review. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978338#comment-15978338 ] Deepak Dixit commented on OFBIZ-9254: - Its too large patch :) Devanshu, Could you please break them into component level? > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978318#comment-15978318 ] Jacques Le Roux commented on OFBIZ-9254: Hi Devanshu, I agree it needs to be done by hand. I did not digg much but I clearly see that side effects are possible. So this will wait a bit on my side. I'm sorry about that because I know by experience than, starting in 1 to 3 months, your patch will begin to deprecate :/ Maybe someone courageous will help... > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952212#comment-15952212 ] Jacques Le Roux commented on OFBIZ-9254: Thanks Devanshu, Perfect, I'll try to find a regexp and compare the changes. Else I'll simply review, quite hypnotic... > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952137#comment-15952137 ] Devanshu Vyas commented on OFBIZ-9254: -- Thanks Jacques for reviewing the patch. I have done all the changes by hand. I did try a couple of regular expressions but was not able to create the perfect one for this case. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OFBIZ-9254) Inconsistent String Comparisons
[ https://issues.apache.org/jira/browse/OFBIZ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950326#comment-15950326 ] Jacques Le Roux commented on OFBIZ-9254: Thanks Devanshu, I have reviewed the Groovy patch and it's OK with me. Reviewing the Java patch is something else (10+ times more). I was wondering: did you do your changes with the help of a regexp S/R or all by hand? Because I could use a regexp S/R to make the same changes and compares with yours. > Inconsistent String Comparisons > --- > > Key: OFBIZ-9254 > URL: https://issues.apache.org/jira/browse/OFBIZ-9254 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS >Affects Versions: Trunk >Reporter: Devanshu Vyas >Priority: Minor > Attachments: OFBIZ-9254_groovy.patch, OFBIZ-9254_java.patch > > > I found an inconsistency in the code for string comparison > statusId.equals("PRUN_COMPLETED") whereas it should be written as > "PRUN_COMPLETED".equals(statusId) > cause the former can throw NullPointerException if the variable found to be > NULL. > This pattern should be applied to > - Java Files > - Groovy Files > - FTL Files > Here is the reference for the discussion done on the dev list. > http://markmail.org/message/iqfaab3fl3ukxchy -- This message was sent by Atlassian JIRA (v6.3.15#6346)