IDEMPIERE-5759 - Fixed potential NPE when sending a null orderclause (#1880)
This commit is contained in:
parent
6c853381a1
commit
5602a15f04
|
@ -695,7 +695,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Get Lines of Order
|
* Get Lines of Order
|
||||||
* @param whereClause where clause or null (starting with AND)
|
* @param whereClause where clause or null (starting with AND)
|
||||||
* @param orderClause order clause
|
* @param orderClause order clause or null
|
||||||
* @return lines
|
* @return lines
|
||||||
*/
|
*/
|
||||||
public MOrderLine[] getLines (String whereClause, String orderClause)
|
public MOrderLine[] getLines (String whereClause, String orderClause)
|
||||||
|
@ -704,7 +704,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
StringBuilder whereClauseFinal = new StringBuilder(MOrderLine.COLUMNNAME_C_Order_ID+"=? ");
|
StringBuilder whereClauseFinal = new StringBuilder(MOrderLine.COLUMNNAME_C_Order_ID+"=? ");
|
||||||
if (!Util.isEmpty(whereClause, true))
|
if (!Util.isEmpty(whereClause, true))
|
||||||
whereClauseFinal.append(whereClause);
|
whereClauseFinal.append(whereClause);
|
||||||
if (orderClause.length() == 0)
|
if (Util.isEmpty(orderClause, true))
|
||||||
orderClause = MOrderLine.COLUMNNAME_Line;
|
orderClause = MOrderLine.COLUMNNAME_Line;
|
||||||
//
|
//
|
||||||
List<MOrderLine> list = new Query(getCtx(), I_C_OrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName())
|
List<MOrderLine> list = new Query(getCtx(), I_C_OrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName())
|
||||||
|
|
Loading…
Reference in New Issue