in case IWhereClauseEditor.getWhereClause() return null, make query error by parameter don't sync

Description

in infowindow.setParameters need check return of IWhereClauseEditor.getWhereClause()
other when IWhereClauseEditor.getWhereClause() return null make below exception:

SEVERE: SELECT COUNT FROM ( SELECT DISTINCT p.M_Product_ID, p.Discontinued AS Discontinued, p.Value AS Value, p.Name AS Name, bomPriceList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bp.Name AS Vendor, pr.PriceLimit AS PriceLimit, pa.IsInstanceAttribute AS IsInstanceAttribute FROM M_Product p
LEFT OUTER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID AND pr.IsActive='Y')
LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID)
LEFT OUTER JOIN M_Product_PO ppo ON (p.M_Product_ID=ppo.M_Product_ID AND ppo.IsCurrentVendor='Y' AND ppo.IsActive='Y')
LEFT OUTER JOIN C_BPartner bp ON (ppo.C_BPartner_ID=bp.C_BPartner_ID) WHERE p.IsActive='Y' AND pr.M_PriceList_Version_ID = ? AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(50007,0,50004,50005,50006,50000,50001,50002,11,12) AND (p.M_Product_ID IS NULL OR p.M_Product_ID NOT IN ( SELECT Record_ID FROM AD_Private_Access WHERE AD_Table_ID = 208 AND AD_User_ID <> 100 AND IsActive = 'Y' )) AND (pa.M_AttributeSet_ID IS NULL OR pa.M_AttributeSet_ID NOT IN ( SELECT Record_ID FROM AD_Private_Access WHERE AD_Table_ID = 560 AND AD_User_ID <> 100 AND IsActive = 'Y' )) AND (bp.C_BPartner_ID IS NULL OR bp.C_BPartner_ID NOT IN ( SELECT Record_ID FROM AD_Private_Access WHERE AD_Table_ID = 291 AND AD_User_ID <> 100 AND IsActive = 'Y' )) ) a
org.postgresql.util.PSQLException: The column index is out of range: 2, number of columns: 1.
at org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:56)
at org.postgresql.core.v3.SimpleParameterList.setBinaryParameter(SimpleParameterList.java:122)
at org.postgresql.jdbc2.AbstractJdbc2Statement.bindBytes(AbstractJdbc2Statement.java:2294)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setInt(AbstractJdbc2Statement.java:1279)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1882)
at org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:36)
at org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:47)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:955)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:128)
at com.sun.proxy.$Proxy3.setObject(Unknown Source)
at org.adempiere.webui.info.InfoWindow.setParameter(InfoWindow.java:926)
at org.adempiere.webui.info.InfoWindow.setParameters(InfoWindow.java:898)
at org.adempiere.webui.info.InfoWindow.testCount(InfoWindow.java:1637)

Environment

None

Assignee

Unassigned

Reporter

Hiep Lq

Labels

Tested By

None

Components

Affects versions

Priority

Minor
Configure