You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2014/10/22 01:04:47 UTC
git commit: SQOOP-1472: Use Properties.load() method to load property
files under conf/manager.d
Repository: sqoop
Updated Branches:
refs/heads/trunk 65a9340fc -> 0d3591141
SQOOP-1472: Use Properties.load() method to load property files under conf/manager.d
(Chiwan Park 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/0d359114
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/0d359114
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/0d359114
Branch: refs/heads/trunk
Commit: 0d35911416ad3bfab7a93311bea8aa697279b60c
Parents: 65a9340
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Tue Oct 21 16:04:22 2014 -0700
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Tue Oct 21 16:04:22 2014 -0700
----------------------------------------------------------------------
src/java/org/apache/sqoop/ConnFactory.java | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/0d359114/src/java/org/apache/sqoop/ConnFactory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/ConnFactory.java b/src/java/org/apache/sqoop/ConnFactory.java
index 335b037..3f77252 100644
--- a/src/java/org/apache/sqoop/ConnFactory.java
+++ b/src/java/org/apache/sqoop/ConnFactory.java
@@ -218,20 +218,7 @@ public class ConnFactory {
// The file format is actually Java properties-file syntax.
r = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
Properties props = new Properties();
- String line;
- while ((line = r.readLine()) != null) {
- if ("".equals(line.trim())) {
- continue;
- }
- int separator = line.indexOf('=');
- if (separator == -1) {
- throw new IOException("the content of connector file must be "
- + "in form of key=value");
- }
- String key = line.substring(0, separator).trim();
- String value = line.substring(separator + 1).trim();
- props.setProperty(key, value);
- }
+ props.load(r);
for (Map.Entry<Object, Object> entry : props.entrySet()) {
// Each key is a ManagerFactory class name.