Skip to content

Commit

Permalink
Solve bug of accidental "?" duplication
Browse files Browse the repository at this point in the history
528: Exception when opening PP Order issue / receipt 

Task-Url: #528
  • Loading branch information
metas-ts committed Aug 29, 2017
1 parent 36b30f2 commit 8d2db89
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ private static final String buildSqlWhereClause_Equals(final String sqlColumnExp
}

return new StringBuilder()
.append(sqlColumnExpr).append(negate ? " <> ?" : " = ").append(sqlParams.placeholder(sqlValue))
.append(sqlColumnExpr)
.append(negate ? " <> " : " = ")
.append(sqlParams.placeholder(sqlValue))
.toString();
}

Expand All @@ -233,13 +235,13 @@ private static final String buildSqlWhereClause_Compare(final String sqlColumnEx

private static final String buildSqlWhereClause_InArray(final String sqlColumnExpr, final List<Object> sqlValues, final SqlParamsCollector sqlParams)
{
if(sqlValues == null || sqlValues.isEmpty())
if (sqlValues == null || sqlValues.isEmpty())
{
// TODO log a warning or throw exception?!
return null;
}
if(sqlParams.isCollecting())

if (sqlParams.isCollecting())
{
final List<Object> sqlValuesEffective = new ArrayList<>();
final String sql = DB.buildSqlList(sqlColumnExpr, sqlValues, sqlValuesEffective);
Expand Down

0 comments on commit 8d2db89

Please sign in to comment.