karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [2/3] karaf git commit: [KARAF-5003] Fix table exists checked twice in JDBC lock
Date Mon, 27 Mar 2017 04:42:50 GMT
[KARAF-5003] Fix table exists checked twice in JDBC lock


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/cd601e41
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/cd601e41
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/cd601e41

Branch: refs/heads/karaf-4.0.x
Commit: cd601e41c8e8af5e8a97a251f0260be901faf957
Parents: e03fcf9
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sun Mar 26 07:50:07 2017 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sun Mar 26 07:51:10 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/cd601e41/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java b/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java
index 5f44b10..806835b 100644
--- a/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java
+++ b/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java
@@ -158,8 +158,7 @@ public class DefaultJDBCLock implements Lock {
     boolean schemaExist(String tableName) {
         try {
             DatabaseMetaData metadata = getConnection().getMetaData();
-            return metadata != null && (checkTableExists(tableName.toLowerCase(),
metadata) //
-                || checkTableExists(tableName.toLowerCase(), metadata));
+            return metadata != null && (checkTableExists(tableName.toLowerCase(),
metadata));
         } catch (Exception ignore) {
             return false;
             //throw new RuntimeException("Error testing for db table", ignore);


Mime
View raw message