sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rzh...@apache.org
Subject sqoop git commit: SQOOP-2388: SQOOP2: Remove duplicate code in ConfigUtils.fromConfigs() (Fudian via Richard)
Date Mon, 08 Jun 2015 10:03:36 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 519693643 -> d9101e229


SQOOP-2388: SQOOP2: Remove duplicate code in ConfigUtils.fromConfigs() (Fudian via Richard)


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

Branch: refs/heads/sqoop2
Commit: d9101e2292e7b3cd2a1793d4b3dbf1d7e50a750a
Parents: 5196936
Author: Richard <richard.zhou@intel.com>
Authored: Mon Jun 8 17:52:27 2015 +0800
Committer: Richard <richard.zhou@intel.com>
Committed: Mon Jun 8 17:52:27 2015 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/sqoop/model/ConfigUtils.java | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/d9101e22/common/src/main/java/org/apache/sqoop/model/ConfigUtils.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/sqoop/model/ConfigUtils.java b/common/src/main/java/org/apache/sqoop/model/ConfigUtils.java
index d584079..72565c7 100644
--- a/common/src/main/java/org/apache/sqoop/model/ConfigUtils.java
+++ b/common/src/main/java/org/apache/sqoop/model/ConfigUtils.java
@@ -270,15 +270,7 @@ public class  ConfigUtils {
     Class klass = configuration.getClass();
 
     for(MConfig config : configs) {
-      Field configField;
-      try {
-        configField = klass.getDeclaredField(config.getName());
-      } catch (NoSuchFieldException e) {
-        throw new SqoopException(ModelError.MODEL_006,
-          "Missing field " + config.getName() + " on config class " + klass.getCanonicalName(),
e);
-      }
-
-      configField = getFieldFromName(klass, config.getName());
+      Field configField = getFieldFromName(klass, config.getName());
       // We need to access this field even if it would be declared as private
       configField.setAccessible(true);
       Class<?> configClass = configField.getType();


Mime
View raw message