empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-226
Date Fri, 11 Sep 2015 12:23:49 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 04e8aa377 -> 0e733cc45


EMPIREDB-226


Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/0e733cc4
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/0e733cc4
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/0e733cc4

Branch: refs/heads/master
Commit: 0e733cc45f081b33f6cc9e45fa9a91c9c817cdfd
Parents: 04e8aa3
Author: Rainer Döbele <doebele@apache.org>
Authored: Fri Sep 11 14:23:41 2015 +0200
Committer: Rainer Döbele <doebele@apache.org>
Committed: Fri Sep 11 14:23:41 2015 +0200

----------------------------------------------------------------------
 empire-db/src/main/java/org/apache/empire/db/DBCommand.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/0e733cc4/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
----------------------------------------------------------------------
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 654c290..556311a 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
@@ -684,10 +684,13 @@ public abstract class DBCommand extends DBCommandExpr
      */
     public void addWhereConstraints(List<DBCompareExpr> constraints)
     {
+        // check argument
+        if (constraints==null || constraints.isEmpty())
+            return; // nothing to do.
+        // allocate
         if (where == null)
-        {
             where = new ArrayList<DBCompareExpr>();
-        }
+        // add
         this.where.addAll(constraints);
     }
 


Mime
View raw message