sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2499: Sqoop2: Findbugs: Fix the problem of URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD for ExampleValue
Date Tue, 18 Aug 2015 16:38:45 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 7ce9f67f7 -> 242146581


SQOOP-2499: Sqoop2: Findbugs: Fix the problem of URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD for
ExampleValue

(Colin Ma via Jarek Jarcec Cecho)


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

Branch: refs/heads/sqoop2
Commit: 242146581e0fd94d3545d559e1e5f77b6853bb8f
Parents: 7ce9f67
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Aug 18 09:38:12 2015 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Aug 18 09:38:12 2015 -0700

----------------------------------------------------------------------
 .../sqoop/common/test/db/types/DatabaseType.java  |  2 +-
 .../sqoop/common/test/db/types/ExampleValue.java  | 18 +++++++++++++++---
 .../connector/jdbc/generic/AllTypesTest.java      |  6 +++---
 3 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/24214658/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DatabaseType.java
----------------------------------------------------------------------
diff --git a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DatabaseType.java
b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DatabaseType.java
index 9b22fa7..a9b9180 100644
--- a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DatabaseType.java
+++ b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DatabaseType.java
@@ -89,7 +89,7 @@ public class DatabaseType {
     String [] ret = new String[values.size()];
     int i = 0;
     for(ExampleValue value : values) {
-      ret[i++] = value.escapedStringValue;
+      ret[i++] = value.getEscapedStringValue();
     }
     return ret;
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/24214658/common-test/src/main/java/org/apache/sqoop/common/test/db/types/ExampleValue.java
----------------------------------------------------------------------
diff --git a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/ExampleValue.java
b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/ExampleValue.java
index 3612a76..8c5da70 100644
--- a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/ExampleValue.java
+++ b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/ExampleValue.java
@@ -24,21 +24,33 @@ public class ExampleValue {
   /**
    * Properly escaped value so that it can be used in INSERT statement.
    */
-  public final String insertStatement;
+  private String insertStatement;
 
   /**
    * Object value that should be returned from JDBC driver getObject().
    */
-  public final Object objectValue;
+  private Object objectValue;
 
   /**
    * Escaped string value that will be stored by HDFS connector.
    */
-  public final String escapedStringValue;
+  private String escapedStringValue;
 
   public ExampleValue(String insertStatement, Object objectValue, String escapedStringValue)
{
     this.insertStatement = insertStatement;
     this.objectValue = objectValue;
     this.escapedStringValue = escapedStringValue;
   }
+
+  public String getInsertStatement() {
+    return insertStatement;
+  }
+
+  public Object getObjectValue() {
+    return objectValue;
+  }
+
+  public String getEscapedStringValue() {
+    return escapedStringValue;
+  }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/24214658/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
index cdb6f81..aece8cf 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
@@ -78,7 +78,7 @@ public class AllTypesTest extends ConnectorTestCase implements ITest {
 
     int i = 1;
     for(ExampleValue value: type.values) {
-      insertRow(false, Integer.toString(i++), value.insertStatement);
+      insertRow(false, Integer.toString(i++), value.getInsertStatement());
     }
 
     // RDBMS link
@@ -152,9 +152,9 @@ public class AllTypesTest extends ConnectorTestCase implements ITest {
     assertEquals(type.values.size(), rowCount());
     for(ExampleValue value : type.values) {
       assertRow(
-        new Object[] {"value", value.insertStatement},
+        new Object[] {"value", value.getInsertStatement()},
         false,
-        value.objectValue);
+        value.getObjectValue());
     }
 
     // Clean up testing table


Mime
View raw message