htrace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject incubator-htrace git commit: HTRACE-360. Missing space in Sampler.java "Cannot find a constructor" error log message (Mike Drob via cmccabe)
Date Tue, 19 Apr 2016 18:17:16 GMT
Repository: incubator-htrace
Updated Branches:
  refs/heads/master 23e2dce78 -> e629995ac


HTRACE-360. Missing space in Sampler.java "Cannot find a constructor" error log message (Mike
Drob via cmccabe)


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

Branch: refs/heads/master
Commit: e629995ac8d90e23a7ca3610808c10905b18d3da
Parents: 23e2dce
Author: Colin P. Mccabe <cmccabe@apache.org>
Authored: Tue Apr 19 11:09:35 2016 -0700
Committer: Colin P. Mccabe <cmccabe@apache.org>
Committed: Tue Apr 19 11:09:35 2016 -0700

----------------------------------------------------------------------
 htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java   | 2 +-
 .../src/test/java/org/apache/htrace/core/TestSampler.java        | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/e629995a/htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java
----------------------------------------------------------------------
diff --git a/htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java b/htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java
index 7ae2bcf..ff326c4 100644
--- a/htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java
+++ b/htrace-core4/src/main/java/org/apache/htrace/core/Sampler.java
@@ -107,7 +107,7 @@ public abstract class Sampler {
         ctor = cls.getConstructor(HTraceConfiguration.class);
       } catch (NoSuchMethodException e) {
         throwError("Cannot find a constructor for class " +
-            str + "which takes an HTraceConfiguration.");
+            str + " which takes an HTraceConfiguration.");
       }
       Sampler sampler = null;
       try {

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/e629995a/htrace-core4/src/test/java/org/apache/htrace/core/TestSampler.java
----------------------------------------------------------------------
diff --git a/htrace-core4/src/test/java/org/apache/htrace/core/TestSampler.java b/htrace-core4/src/test/java/org/apache/htrace/core/TestSampler.java
index 2305d9f..92943b5 100644
--- a/htrace-core4/src/test/java/org/apache/htrace/core/TestSampler.java
+++ b/htrace-core4/src/test/java/org/apache/htrace/core/TestSampler.java
@@ -81,6 +81,10 @@ public class TestSampler {
     samplers = getSamplersFromConf(HTraceConfiguration.
         fromKeyValuePairs("sampler.classes", "NonExistentSampler"));
     Assert.assertEquals(0, samplers.length);
+    
+    samplers = getSamplersFromConf(HTraceConfiguration.
+        fromKeyValuePairs("sampler.classes", "java.lang.String"));
+    Assert.assertEquals(0, samplers.length);
 
     samplers = getSamplersFromConf(HTraceConfiguration.EMPTY);
     Assert.assertEquals(0, samplers.length);


Mime
View raw message