From f269e624702074c1fe8a3dc8050fc0e9d18adc88 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sun, 20 Dec 2020 18:22:29 +0800 Subject: [PATCH 1/2] fix bug --- cluster/router/healthcheck/default_health_check.go | 1 - protocol/dubbo/impl/hessian.go | 4 +--- registry/zookeeper/registry.go | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cluster/router/healthcheck/default_health_check.go b/cluster/router/healthcheck/default_health_check.go index 3effd779c9..378463be56 100644 --- a/cluster/router/healthcheck/default_health_check.go +++ b/cluster/router/healthcheck/default_health_check.go @@ -96,7 +96,6 @@ func (c *DefaultHealthChecker) getCircuitBreakerSleepWindowTime(status *protocol return int64(sleepWindow) } - // GetRequestSuccessiveFailureThreshold return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker func (c *DefaultHealthChecker) GetRequestSuccessiveFailureThreshold() int32 { return c.requestSuccessiveFailureThreshold diff --git a/protocol/dubbo/impl/hessian.go b/protocol/dubbo/impl/hessian.go index 066400d58b..9f23d365e0 100644 --- a/protocol/dubbo/impl/hessian.go +++ b/protocol/dubbo/impl/hessian.go @@ -37,8 +37,6 @@ import ( "github.com/apache/dubbo-go/common/logger" ) -type Object interface{} - type HessianSerializer struct { } @@ -474,7 +472,7 @@ func getArgType(v interface{}) string { return "java.lang.String" case []string: return "[Ljava.lang.String;" - case []Object: + case []hessian.Object: return "[Ljava.lang.Object;" case map[interface{}]interface{}: // return "java.util.HashMap" diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 76fc052b6f..fe492c2b12 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -212,7 +212,7 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error { r.cltLock.Lock() defer r.cltLock.Unlock() - if r.client == nil{ + if r.client == nil { return perrors.WithStack(perrors.New("zk client already been closed")) } err = r.client.Create(root) From c57982a333135cf8744dbf3d47a9bb666a0bc64e Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sun, 20 Dec 2020 19:55:42 +0800 Subject: [PATCH 2/2] add fmt --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7b338c2779..4f79ecf3bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ install: true # define ci-stage script: + - go fmt ./... && [[ -z `git status -s` ]] # license-check - make verify # integrate-test