kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: kafka-1799; ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG doesn't work; patched by Manikumar Reddy; reviewed by Jun Rao
Date Tue, 02 Dec 2014 00:02:54 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 4408f487a -> 8a719e037


kafka-1799; ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG doesn't work; patched by Manikumar
Reddy; reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: 8a719e037201e343e22a3d2479651e781ddaccc1
Parents: 4408f48
Author: Manikumar Reddy <manikumar.reddy@gmail.com>
Authored: Mon Dec 1 16:02:47 2014 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Mon Dec 1 16:02:47 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/kafka/common/config/AbstractConfig.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/8a719e03/clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java b/clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java
index 8d88610..3d4ab72 100644
--- a/clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java
+++ b/clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java
@@ -144,7 +144,12 @@ public class AbstractConfig {
         List<String> klasses = getList(key);
         List<T> objects = new ArrayList<T>();
         for (String klass : klasses) {
-            Class<?> c = getClass(klass);
+            Class<?> c;
+            try {
+                c = Class.forName(klass);
+            } catch (ClassNotFoundException e) {
+                throw new ConfigException(key, klass, "Class " + klass + " could not be found.");
+            }
             if (c == null)
                 return null;
             Object o = Utils.newInstance(c);


Mime
View raw message