You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2017/02/25 05:53:10 UTC

[1/2] polygene-java git commit: Missed a compile error...

Repository: polygene-java
Updated Branches:
  refs/heads/develop e34dad331 -> 3dd420127


Missed a compile error...


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/1451f9aa
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/1451f9aa
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/1451f9aa

Branch: refs/heads/develop
Commit: 1451f9aaa89d15d686e4b214dc5396924189e5cb
Parents: e34dad3
Author: niclas <ni...@spicter.com>
Authored: Sat Feb 25 13:49:16 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sat Feb 25 13:49:16 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/polygene/spi/metrics/DefaultMetric.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/1451f9aa/core/spi/src/main/java/org/apache/polygene/spi/metrics/DefaultMetric.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/metrics/DefaultMetric.java b/core/spi/src/main/java/org/apache/polygene/spi/metrics/DefaultMetric.java
index 43250c8..91ea9fc 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/metrics/DefaultMetric.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/metrics/DefaultMetric.java
@@ -76,7 +76,7 @@ public final class DefaultMetric
     public Result check()
         throws Exception
     {
-        return new Result( true, "No checks", null );
+        return  Result.healthOk();
     }
 
     @Override


[2/2] polygene-java git commit: Fixed CodeHale implementation to changes in SPI.

Posted by ni...@apache.org.
Fixed CodeHale implementation to changes in SPI.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/3dd42012
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/3dd42012
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/3dd42012

Branch: refs/heads/develop
Commit: 3dd420127ca30a452cd7e100130aa71994fc3620
Parents: 1451f9a
Author: niclas <ni...@spicter.com>
Authored: Sat Feb 25 13:53:04 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sat Feb 25 13:53:04 2017 +0800

----------------------------------------------------------------------
 .../polygene/metrics/codahale/CodahaleHealthCheck.java  | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3dd42012/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleHealthCheck.java
----------------------------------------------------------------------
diff --git a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleHealthCheck.java b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleHealthCheck.java
index e679d25..ebe8b5c 100644
--- a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleHealthCheck.java
+++ b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleHealthCheck.java
@@ -42,7 +42,17 @@ public class CodahaleHealthCheck
 
     static Result wrap( HealthCheck.Result result )
     {
-        return new Result( result.isHealthy(), result.getMessage(), result.getError() );
+        if( result.isHealthy() )
+        {
+            return Result.healthOk();
+        }
+        String message = result.getMessage();
+        Throwable error = result.getError();
+        if( error != null )
+        {
+            return Result.exception( message, error );
+        }
+        return Result.unhealthy( message );
     }
 
     static HealthCheck.Result unwrap( Result result )