Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9254

Inconsistent String Comparisons

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • 17.12.05, 18.12.01
    • ALL COMPONENTS
    • None

    Description

      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

      Attachments

        1. OFBIZ-9251_ftl_accounting.patch
          23 kB
          Devanshu Vyas
        2. OFBIZ-9251_ftl_framework.patch
          33 kB
          Devanshu Vyas
        3. OFBIZ-9251_ftl_manuf_workeffrt.patch
          7 kB
          Devanshu Vyas
        4. OFBIZ-9251_ftl_order.patch
          158 kB
          Devanshu Vyas
        5. OFBIZ-9251_ftl_party_content.patch
          25 kB
          Devanshu Vyas
        6. OFBIZ-9251_ftl_plugins_ebay_ebaystore.patch
          18 kB
          Devanshu Vyas
        7. OFBIZ-9251_ftl_plugins_ecommerce.patch
          106 kB
          Devanshu Vyas
        8. OFBIZ-9251_ftl_plugins_pricat_projmgr.patch
          9 kB
          Devanshu Vyas
        9. OFBIZ-9251_ftl_product.patch
          78 kB
          Devanshu Vyas
        10. OFBIZ-9251_ftl_themes.patch
          11 kB
          Devanshu Vyas
        11. OFBIZ-9254_FTL-I.patch
          16 kB
          Devanshu Vyas
        12. OFBIZ-9254_groovy_applications.patch
          15 kB
          Devanshu Vyas
        13. OFBIZ-9254_groovy_framework.patch
          10 kB
          Devanshu Vyas
        14. OFBIZ-9254_java_accounting.patch
          37 kB
          Devanshu Vyas
        15. OFBIZ-9254_java_base.patch
          11 kB
          Devanshu Vyas
        16. OFBIZ-9254_java_content.patch
          56 kB
          Devanshu Vyas
        17. OFBIZ-9254_java_entity.patch
          9 kB
          Devanshu Vyas
        18. OFBIZ-9254_java_order.patch
          44 kB
          Devanshu Vyas
        19. OFBIZ-9254_java_Party_WE_MFC.patch
          21 kB
          Devanshu Vyas
        20. OFBIZ-9254_java_product.patch
          43 kB
          Devanshu Vyas
        21. OFBIZ-9254_java_service.patch
          17 kB
          Devanshu Vyas
        22. OFBIZ-9254_java_test_entityext_common_cattalina_datafile.patch
          11 kB
          Devanshu Vyas
        23. OFBIZ-9254_java_webapp.patch
          8 kB
          Devanshu Vyas
        24. OFBIZ-9254_java_webtools.patch
          5 kB
          Devanshu Vyas
        25. OFBIZ-9254_java_widget.patch
          26 kB
          Devanshu Vyas
        26. OFBIZ-9254_plugins_groovy.patch
          19 kB
          Devanshu Vyas
        27. OFBIZ-9254_plugins_java.patch
          48 kB
          Devanshu Vyas
        28. OFBIZ-9254_plugins.patch
          14 kB
          Devanshu Vyas
        29. OFBIZ-9254.patch
          16 kB
          Devanshu Vyas

        Issue Links

          Activity

            People

              pawan Pawan Verma
              devanshu Devanshu Vyas
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: