/[Apache-SVN]
ViewVC logotype

Revision 1863685


Jump to revision: Previous Next
Author: nmalin
Date: Wed Jul 24 06:56:44 2019 UTC (4 years, 8 months ago)
Changed paths: 1
Log Message:
Fixed: EntityCondition(EntityOperator, fields...) raise exception with a null value
(OFBIZ-11143)

When you write an entity 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.

Thanks to Pawan Verma for the review

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26