From 22624508bbd30dd83b09b48303196d7dcd73c410 Mon Sep 17 00:00:00 2001 From: lzj <371209704@qq.com> Date: Mon, 28 May 2018 10:21:15 +0800 Subject: [PATCH] fix #1845 (#1851) --- .../main/java/com/alibaba/dubbo/config/ProtocolConfig.java | 2 +- .../java/com/alibaba/dubbo/config/ProtocolConfigTest.java | 2 +- .../alibaba/dubbo/registry/integration/RegistryDirectory.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java index b15129bf6fb..f82fe04144d 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java @@ -454,7 +454,7 @@ public void setExtension(String extension) { this.extension = extension; } - public void destory() { + public void destroy() { if (name != null) { ExtensionLoader.getExtensionLoader(Protocol.class).getExtension(name).destroy(); } diff --git a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ProtocolConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ProtocolConfigTest.java index 4d10c72b738..797471c6a99 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ProtocolConfigTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ProtocolConfigTest.java @@ -39,7 +39,7 @@ public void testDestroy() throws Exception { MockProtocol2.delegate = protocol; ProtocolConfig protocolConfig = new ProtocolConfig(); protocolConfig.setName("mockprotocol2"); - protocolConfig.destory(); + protocolConfig.destroy(); Mockito.verify(protocol).destroy(); } diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryDirectory.java index e832daec501..4bd0908a1ed 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryDirectory.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryDirectory.java @@ -557,10 +557,10 @@ private void destroyUnusedInvokers(Map> oldUrlInvokerMap, Map try { invoker.destroy(); if (logger.isDebugEnabled()) { - logger.debug("destory invoker[" + invoker.getUrl() + "] success. "); + logger.debug("destroy invoker[" + invoker.getUrl() + "] success. "); } } catch (Exception e) { - logger.warn("destory invoker[" + invoker.getUrl() + "] faild. " + e.getMessage(), e); + logger.warn("destroy invoker[" + invoker.getUrl() + "] faild. " + e.getMessage(), e); } } }