You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by do...@apache.org on 2021/03/29 14:00:25 UTC

[empire-db] branch master updated: EMPIREDB-340 dont use command param when value is null

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 ac7a31e  EMPIREDB-340 dont use command param when value is null
ac7a31e is described below

commit ac7a31e16f65d5683ea58a89ddffbf9090e63e95
Author: Rainer Döbele <do...@apache.org>
AuthorDate: Mon Mar 29 16:00:21 2021 +0200

    EMPIREDB-340
    dont use command param when value is null
---
 empire-db/src/main/java/org/apache/empire/db/DBCommand.java | 2 +-
 1 file changed, 1 insertion(+), 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 b8b8b6f..67b1f6d 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
@@ -359,7 +359,7 @@ public abstract class DBCommand extends DBCommandExpr
     protected boolean useCmdParam(DBColumn col, Object value)
     {
         // Cannot wrap DBExpr or DBSystemDate
-        if (value instanceof DBExpr || value instanceof DBDatabase.DBSystemDate)
+        if (value==null || value instanceof DBExpr || value instanceof DBDatabase.DBSystemDate)
             return false;
         // Check if prepared statements are enabled
         if (isPreparedStatementsEnabled())