This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 784884dd EMPIREDB-390 Ignore null params passed to DBCommand.join as
addlConstraints
784884dd is described below
commit 784884dd67ddbfd13162b45a7028d5f72f83661d
Author: Rainer Döbele <[email protected]>
AuthorDate: Wed Jul 20 11:43:57 2022 +0200
EMPIREDB-390 Ignore null params passed to DBCommand.join as addlConstraints
---
empire-db/src/main/java/org/apache/empire/db/DBCommand.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
index 71c6080a..5d169b25 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
@@ -750,7 +750,9 @@ public abstract class DBCommand extends DBCommandExpr
DBCompareExpr where = null;
for (int i=0; i<addlConstraints.length; i++)
{
- DBCompareExpr cmpExpr = addlConstraints[i];
+ DBCompareExpr cmpExpr = addlConstraints[i];
+ if (cmpExpr==null)
+ continue;
// Check if prepared statements are enabled
if (isPreparedStatementsEnabled())
{ // use command params