geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [geode] branch feature/GEODE-3781 updated: renamed k to tableName
Date Mon, 30 Oct 2017 18:30:13 GMT
This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch feature/GEODE-3781
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-3781 by this push:
     new c7d6986  renamed k to tableName
c7d6986 is described below

commit c7d69862abf4b19ff17e20f79126ea97f68e3161
Author: Darrel Schneider <dschneider@pivotal.io>
AuthorDate: Mon Oct 30 11:29:57 2017 -0700

    renamed k to tableName
---
 .../java/org/apache/geode/connectors/jdbc/JDBCManager.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
index 0b2fc70..42224f9 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
@@ -303,7 +303,7 @@ public class JDBCManager {
     });
   }
 
-  private String computeKeyColumnName(String k) {
+  private String computeKeyColumnName(String tableName) {
     // TODO: check config for key column
     Connection con = getConnection();
     try {
@@ -312,7 +312,7 @@ public class JDBCManager {
       String realTableName = null;
       while (tablesRS.next()) {
         String name = tablesRS.getString("TABLE_NAME");
-        if (name.equalsIgnoreCase(k)) {
+        if (name.equalsIgnoreCase(tableName)) {
           if (realTableName != null) {
             throw new IllegalStateException("Duplicate tables that match region name");
           }
@@ -320,16 +320,17 @@ public class JDBCManager {
         }
       }
       if (realTableName == null) {
-        throw new IllegalStateException("no table was found that matches " + k);
+        throw new IllegalStateException("no table was found that matches " + tableName);
       }
       ResultSet primaryKeys = metaData.getPrimaryKeys(null, null, realTableName);
       if (!primaryKeys.next()) {
-        throw new IllegalStateException("The table " + k + " does not have a primary key
column.");
+        throw new IllegalStateException(
+            "The table " + tableName + " does not have a primary key column.");
       }
       String key = primaryKeys.getString("COLUMN_NAME");
       if (primaryKeys.next()) {
         throw new IllegalStateException(
-            "The table " + k + " has more than one primary key column.");
+            "The table " + tableName + " has more than one primary key column.");
       }
       return key;
     } catch (SQLException e) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <commits@geode.apache.org>'].

Mime
View raw message