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

EntityCondition(EntityOperator, fields...) raise exception with a null value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • None
    • framework
    • None

    Description

      When yo write a condition like

      rawProdcuts = from("Product")
                    .where(
      EntityCondition.makeCondition(EntityOperator.AND,
             'productTypeId', 'RAW_MATERIAL',
              'quantityUomId', null)
      )
      .queryList()

      the function

      public static EntityFieldMap makeCondition(EntityJoinOperator joinOp, Object... keysValues) 

      raise a IllegalArgumentException

      The problem came from EntityUtil.makeFields(V... args) (EntityUtil.java:65) who check if a value is an insteance of Comparable and Serializable but didn't take the case tat where have a null value.

       

      Attachments

        1. OFBIZ-11143.patch
          1 kB
          Nicolas Malin
        2. OFBIZ-11143.patch
          2 kB
          Pawan Verma

        Activity

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: