IDEMPIERE-1979 / fix NPE on initial query

This commit is contained in:
Carlos Ruiz 2014-07-02 13:45:09 -05:00
parent aa9dc46a27
commit f8a1d6adfd
1 changed files with 2 additions and 2 deletions

View File

@ -713,7 +713,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
* when query not by click requery button, reuse prev where clause
* IDEMPIERE-1979
*/
if (!isQueryByUser){
if (!isQueryByUser && prevWhereClause != null){
return prevWhereClause;
}
@ -828,7 +828,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected void setParameters(PreparedStatement pstmt, boolean forCount)
throws SQLException {
// when query not by click requery button, reuse parameter value
if (!isQueryByUser){
if (!isQueryByUser && prevParameterValues != null){
for (int parameterIndex = 0; parameterIndex < prevParameterValues.size(); parameterIndex++){
setParameter (pstmt, parameterIndex + 1, prevParameterValues.get(parameterIndex), prevQueryOperators.get(parameterIndex));
}