[dubbo] branch master updated: Service callback throws "Not found exported service" when 'bind.port' is set (#6223)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/master by this push: new ba89f44 Service callback throws "Not found exported service" when 'bind.port' is set (#6223) ba89f44 is described below commit ba89f44f5aeddd2d06024232a15e355c2e8dc5cd Author: 李黄河 AuthorDate: Wed Jul 1 13:46:26 2020 +0800 Service callback throws "Not found exported service" when 'bind.port' is set (#6223) --- .../rpc/protocol/dubbo/CallbackServiceCodec.java | 3 ++ .../rpc/protocol/dubbo/ArgumentCallbackTest.java | 39 +- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java index 7a60e0e..eead37c 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java @@ -24,6 +24,7 @@ import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.common.utils.ConcurrentHashSet; import org.apache.dubbo.common.utils.StringUtils; import org.apache.dubbo.remoting.Channel; +import org.apache.dubbo.remoting.Constants; import org.apache.dubbo.remoting.RemotingException; import org.apache.dubbo.rpc.Exporter; import org.apache.dubbo.rpc.Invocation; @@ -113,7 +114,9 @@ class CallbackServiceCodec { } } tmpMap.putAll(params); + tmpMap.remove(VERSION_KEY);// doesn't need to distinguish version for callback +tmpMap.remove(Constants.BIND_PORT_KEY); //callback doesn't needs bind.port tmpMap.put(INTERFACE_KEY, clazz.getName()); URL exportUrl = new URL(DubboProtocol.NAME, channel.getLocalAddress().getAddress().getHostAddress(), channel.getLocalAddress().getPort(), clazz.getName() + "." + instid, tmpMap); diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ArgumentCallbackTest.java b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ArgumentCallbackTest.java index a51244a..c3ccb33 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ArgumentCallbackTest.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ArgumentCallbackTest.java @@ -16,6 +16,14 @@ */ package org.apache.dubbo.rpc.protocol.dubbo; +import static org.apache.dubbo.common.constants.CommonConstants.CALLBACK_INSTANCES_LIMIT_KEY; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + import org.apache.dubbo.common.URL; import org.apache.dubbo.common.utils.NetUtils; import org.apache.dubbo.rpc.Exporter; @@ -23,20 +31,12 @@ import org.apache.dubbo.rpc.Invoker; import org.apache.dubbo.rpc.RpcException; import org.apache.dubbo.rpc.model.ApplicationModel; import org.apache.dubbo.rpc.protocol.dubbo.support.ProtocolUtils; - import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import static org.apache.dubbo.common.constants.CommonConstants.CALLBACK_INSTANCES_LIMIT_KEY; +import org.apache.dubbo.remoting.Constants; public class ArgumentCallbackTest { @@ -104,6 +104,27 @@ public class ArgumentCallbackTest { } catch (Exception e) { } } + +@Test +public void TestCallbackNormalWithBindPort() throws Exception { +initOrResetUrl(1, 1000); +consumerUrl = serviceURL.addParameter(Constants.BIND_PORT_KEY,"7653"); +initOrResetService(); + +final AtomicInteger count = new AtomicInteger(0); + +demoProxy.xxx(new IDemoCallback() { +public String yyy(String msg) { +System.out.println("Recived callback: " + msg); +count.incrementAndGet(); +return "ok"; +} +}, "other custom args", 10, 100); +System.out.println("Async..."); +assertCallbackCount(10, 100, count); +destroyService(); + +} @Test public void TestCallbackNormal() throws Exception {
[dubbo] branch master updated: Do not clear all configurator instances when override is empty (#6395)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/master by this push: new 1c407de Do not clear all configurator instances when override is empty (#6395) 1c407de is described below commit 1c407deb0044cbae39e242a2bda2b691d3f722a0 Author: Joe Zou AuthorDate: Wed Jul 1 13:02:13 2020 +0800 Do not clear all configurator instances when override is empty (#6395) --- .../src/main/java/org/apache/dubbo/rpc/cluster/Configurator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Configurator.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Configurator.java index 24e5683..436f0dc 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Configurator.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Configurator.java @@ -86,8 +86,7 @@ public interface Configurator extends Comparable { Map override = new HashMap<>(url.getParameters()); //The anyhost parameter of override may be added automatically, it can't change the judgement of changing url override.remove(ANYHOST_KEY); -if (override.size() == 0) { -configurators.clear(); +if (CollectionUtils.isEmptyMap(override)) { continue; } configurators.add(configuratorFactory.getConfigurator(url));
[dubbo] branch master updated: add tps filter to SPI list (#6282)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/master by this push: new a68f7ba add tps filter to SPI list (#6282) a68f7ba is described below commit a68f7ba24e18f892f7663e91d415386f3513f4b8 Author: Christophe·liwei <2484713...@qq.com> AuthorDate: Wed Jul 1 11:50:05 2020 +0800 add tps filter to SPI list (#6282) --- .../main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter b/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter index 376f966..3d6da08 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter +++ b/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter @@ -11,4 +11,5 @@ exception=org.apache.dubbo.rpc.filter.ExceptionFilter executelimit=org.apache.dubbo.rpc.filter.ExecuteLimitFilter deprecated=org.apache.dubbo.rpc.filter.DeprecatedFilter compatible=org.apache.dubbo.rpc.filter.CompatibleFilter -timeout=org.apache.dubbo.rpc.filter.TimeoutFilter \ No newline at end of file +timeout=org.apache.dubbo.rpc.filter.TimeoutFilter +tps=org.apache.dubbo.rpc.filter.TpsLimitFilter \ No newline at end of file
[dubbo] branch master updated (5668d74 -> 5ad186f)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git. from 5668d74 Fix export provider error, change to catch throwable, handle NoClassDefFoundError (#6380) add 5ad186f check parameterTypesDesc of Generic and Echo (#6374) No new revisions were added by this update. Summary of changes: .../org/apache/dubbo/common/constants/CommonConstants.java | 1 + .../src/main/java/org/apache/dubbo/rpc/Constants.java| 1 + .../java/org/apache/dubbo/rpc/filter/GenericImplFilter.java | 3 +-- .../src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java | 12 .../dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java| 2 +- 5 files changed, 12 insertions(+), 7 deletions(-)
[dubbo-go-hessian2] branch master updated: revert to f7e01d2. the master branch is protected so that cannot reset to history version
This is an automated email from the ASF dual-hosted git repository. victory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git The following commit(s) were added to refs/heads/master by this push: new 7b6abc2 revert to f7e01d2. the master branch is protected so that cannot reset to history version 7b6abc2 is described below commit 7b6abc205643b6c2fad03bdb9aa3c35fb5aeabfd Author: cvictory AuthorDate: Wed Jul 1 11:44:30 2020 +0800 revert to f7e01d2. the master branch is protected so that cannot reset to history version --- java_exception/exception.go| 4 +- java_unknown_exception.go | 90 -- java_unknown_exception_test.go | 43 list.go| 6 --- object.go | 5 --- 5 files changed, 2 insertions(+), 146 deletions(-) diff --git a/java_exception/exception.go b/java_exception/exception.go index 30515ef..2b3f5d3 100644 --- a/java_exception/exception.go +++ b/java_exception/exception.go @@ -98,7 +98,7 @@ type StackTraceElement struct { DeclaringClass string MethodName string FileName string - LineNumber int32 + LineNumber int } //JavaClassName java fully qualified path @@ -121,4 +121,4 @@ func (Method) JavaClassName() string { func (Class) JavaClassName() string { return "java.lang.Class" -} \ No newline at end of file +} diff --git a/java_unknown_exception.go b/java_unknown_exception.go deleted file mode 100644 index 5ea5a49..000 --- a/java_unknown_exception.go +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package hessian - -import ( - "fmt" - "sync" -) - -import ( - "github.com/apache/dubbo-go-hessian2/java_exception" -) - -var ( - expRegMutex sync.Mutex -) - -func checkAndGetException(cls classInfo) (structInfo, bool) { - - if len(cls.fieldNameList) < 4 { - return structInfo{}, false - } - var ( - throwable structInfo - okbool - ) - var count = 0 - for _, item := range cls.fieldNameList { - if item == "detailMessage" || item == "suppressedExceptions" || item == "stackTrace" || item == "cause" { - count++ - } - } - // if have these 4 fields, it is throwable struct - if count == 4 { - if throwable, ok = getStructInfo(cls.javaName); ok { - return throwable, true - } - expRegMutex.Lock() - defer expRegMutex.Unlock() - RegisterPOJO(newBizException(cls.javaName)) - if throwable, ok = getStructInfo(cls.javaName); ok { - return throwable, true - } - } - return throwable, count == 4 -} - -type UnknownException struct { - SerialVersionUID int64 - DetailMessagestring - SuppressedExceptions []java_exception.Throwabler - StackTrace []java_exception.StackTraceElement - Causejava_exception.Throwabler - name string -} - -// NewThrowable is the constructor -func newBizException(name string) *UnknownException { - return {name: name, StackTrace: []java_exception.StackTraceElement{}} -} - -// Error output error message -func (e UnknownException) Error() string { - return fmt.Sprintf("throw %v : %v", e.name, e.DetailMessage) -} - -//JavaClassName java fully qualified path -func (e UnknownException) JavaClassName() string { - return e.name -} - -// equals to getStackTrace in java -func (e UnknownException) GetStackTrace() []java_exception.StackTraceElement { - return e.StackTrace -} diff --git a/java_unknown_exception_test.go b/java_unknown_exception_test.go deleted file mode 100644 index fa14ed3..000 --- a/java_unknown_exception_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for
[dubbo] branch master updated: Fix export provider error, change to catch throwable, handle NoClassDefFoundError (#6380)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/master by this push: new 5668d74 Fix export provider error, change to catch throwable, handle NoClassDefFoundError (#6380) 5668d74 is described below commit 5668d740766f6303e789f072100cd235e4b67582 Author: skyguard1 AuthorDate: Wed Jul 1 11:42:09 2020 +0800 Fix export provider error, change to catch throwable, handle NoClassDefFoundError (#6380) --- .../dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java | 2 +- .../dubbo/metadata/store/InMemoryWritableMetadataService.java | 6 +++--- .../apache/dubbo/metadata/store/RemoteWritableMetadataService.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java index 5585b35..f5043e3 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java @@ -40,7 +40,7 @@ import static org.apache.dubbo.common.constants.RegistryConstants.ZONE_KEY; /** * When there're more than one registry for subscription. - * + * * This extension provides a strategy to decide how to distribute traffics among them: * 1. registry marked as 'preferred=true' has the highest priority. * 2. check the zone the current request belongs, pick the registry that has the same zone first. diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/InMemoryWritableMetadataService.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/InMemoryWritableMetadataService.java index 2907910..ee1e4d1 100644 --- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/InMemoryWritableMetadataService.java +++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/InMemoryWritableMetadataService.java @@ -143,10 +143,10 @@ public class InMemoryWritableMetadataService implements WritableMetadataService serviceDefinitions.put(providerUrl.getServiceKey(), data); return; } -logger.info("publishProvider interfaceName is empty . providerUrl: " + providerUrl.toFullString()); -} catch (ClassNotFoundException e) { +logger.error("publishProvider interfaceName is empty . providerUrl: " + providerUrl.toFullString()); +} catch (Throwable t) { //ignore error -logger.error("publishProvider getServiceDescriptor error. providerUrl: " + providerUrl.toFullString(), e); +logger.error("publishProvider getServiceDescriptor error. providerUrl: " + providerUrl.toFullString(), t.getCause()); } } diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/RemoteWritableMetadataService.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/RemoteWritableMetadataService.java index 9891478..0a2dd76 100644 --- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/RemoteWritableMetadataService.java +++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/RemoteWritableMetadataService.java @@ -100,9 +100,9 @@ public class RemoteWritableMetadataService implements WritableMetadataService { return; } logger.error("publishProvider interfaceName is empty . providerUrl: " + providerUrl.toFullString()); -} catch (ClassNotFoundException e) { +} catch (Throwable t) { //ignore error -logger.error("publishProvider getServiceDescriptor error. providerUrl: " + providerUrl.toFullString(), e); +logger.error("publishProvider getServiceDescriptor error. providerUrl: " + providerUrl.toFullString(), t.getCause()); } }
[dubbo] branch master updated: fix typo in CommonConstants (#6373)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/master by this push: new 41cbb23 fix typo in CommonConstants (#6373) 41cbb23 is described below commit 41cbb23473e9443ac2f0d4a0dd77488bfcd06e09 Author: D-H-T AuthorDate: Wed Jul 1 11:36:37 2020 +0800 fix typo in CommonConstants (#6373) --- .../java/org/apache/dubbo/common/constants/CommonConstants.java | 6 +++--- .../src/main/java/org/apache/dubbo/config/MetadataReportConfig.java | 4 ++-- .../src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java| 4 ++-- .../src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java| 4 ++-- .../main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java index cac52fe..25e8417 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java @@ -112,7 +112,7 @@ public interface CommonConstants { // used by invocation attachments to transfer timeout from Consumer to Provider. // works as a replacement of TIMEOUT_KEY on wire, which seems to be totally useless in previous releases). -String TIMEOUT_ATTACHENT_KEY = "_TO"; +String TIMEOUT_ATTACHMENT_KEY = "_TO"; String TIME_COUNTDOWN_KEY = "timeout-countdown"; @@ -120,13 +120,13 @@ public interface CommonConstants { String REMOVE_VALUE_PREFIX = "-"; -String PROPERTIES_CHAR_SEPERATOR = "-"; +String PROPERTIES_CHAR_SEPARATOR = "-"; String UNDERLINE_SEPARATOR = "_"; String SEPARATOR_REGEX = "_|-"; -String GROUP_CHAR_SEPERATOR = ":"; +String GROUP_CHAR_SEPARATOR = ":"; String HIDE_KEY_PREFIX = "."; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java index 0abda27..175288c 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java @@ -24,7 +24,7 @@ import java.util.HashMap; import java.util.Map; import static org.apache.dubbo.common.constants.CommonConstants.DUBBO; -import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPERATOR; +import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPARATOR; /** * MetadataReportConfig @@ -38,7 +38,7 @@ public class MetadataReportConfig extends AbstractConfig { * the value is : metadata-report */ private static final String PREFIX_TAG = StringUtils.camelToSplitName( -MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPERATOR); +MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPARATOR); // Register center address private String address; diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java index 81ad8df..291601a 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java @@ -40,7 +40,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY; import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY; import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER; import static org.apache.dubbo.common.constants.CommonConstants.REMOTE_APPLICATION_KEY; -import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY; import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY; import static org.apache.dubbo.common.constants.CommonConstants.TIME_COUNTDOWN_KEY; import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY; @@ -71,7 +71,7 @@ public class ContextFilter implements Filter, Filter.Listener { UNLOADING_KEYS.add(DUBBO_VERSION_KEY); UNLOADING_KEYS.add(TOKEN_KEY); UNLOADING_KEYS.add(TIMEOUT_KEY); -UNLOADING_KEYS.add(TIMEOUT_ATTACHENT_KEY); +UNLOADING_KEYS.add(TIMEOUT_ATTACHMENT_KEY); // Remove async property to avoid being passed to the following invoke chain.
[dubbo-go-hessian2] branch master updated (f7e01d2 -> 4116f3b)
This is an automated email from the ASF dual-hosted git repository. victory pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git. from f7e01d2 add GetStackTrace method in Throwabler and its implements (#207) add 445d48e fix hessian issue add 6652e35 optimize exception bug add 83c7cfc optimize exception bug add a3a8fa9 fix review issue add 863e393 fix review issue add b582516 fix review issue add e793b3e fix review issue add 8d765a5 rename bizException to unknownException add 41f41aa fix review issue add 595e399 fix review issue new 530c6c0 Merge branch 'master' of github.com:apache/dubbo-go-hessian2 new 4116f3b add unit test The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java_exception/exception.go | 2 +- java_unknown_exception.go | 90 +++ boolean_test.go => java_unknown_exception_test.go | 44 --- list.go | 6 ++ object.go | 5 ++ 5 files changed, 118 insertions(+), 29 deletions(-) create mode 100644 java_unknown_exception.go copy boolean_test.go => java_unknown_exception_test.go (55%)
[dubbo-go-hessian2] 01/02: Merge branch 'master' of github.com:apache/dubbo-go-hessian2
This is an automated email from the ASF dual-hosted git repository. victory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git commit 530c6c0cc8a999a083bf22637b2c7987ba56da83 Merge: 595e399 f7e01d2 Author: cvictory AuthorDate: Wed Jul 1 10:14:01 2020 +0800 Merge branch 'master' of github.com:apache/dubbo-go-hessian2 .../annotation_type_mismatch_exception.go | 5 +++ java_exception/arithmetic_exception.go | 5 +++ .../array_index_out_of_bounds_exception.go | 5 +++ java_exception/array_store_exception.go| 5 +++ java_exception/backing_store_exception.go | 5 +++ java_exception/broken_barrier_exception.go | 5 +++ java_exception/cancellation_exception.go | 5 +++ java_exception/class_not_found_exception.go| 5 +++ java_exception/classc_cast_exception.go| 5 +++ java_exception/clone_not_supported_exception.go| 5 +++ java_exception/completion_exception.go | 5 +++ .../concurrent_modification_exception.go | 5 +++ java_exception/data_format_exception.go| 5 +++ java_exception/date_time_exception.go | 5 +++ java_exception/date_time_parse_exception.go| 5 +++ java_exception/dubbo_generic_exception.go | 5 +++ java_exception/duplicate_format_flags_exception.go | 5 +++ java_exception/empty_stack_exception.go| 5 +++ .../enum_constant_not_present_exception.go | 5 +++ java_exception/eof_exception.go| 5 +++ java_exception/exception.go| 13 ++- java_exception/execution_exception.go | 5 +++ java_exception/file_not_found_exception.go | 5 +++ java_exception/formatter_closed_exception.go | 5 +++ java_exception/illegal_access_exception.go | 5 +++ java_exception/illegal_argument_exception.go | 4 ++ java_exception/illegal_classFormat_exception.go| 5 +++ .../illegal_format_code_point_exception.go | 5 +++ .../illegal_format_conversion_exception.go | 5 +++ java_exception/illegal_format_flags_exception.go | 5 +++ .../illegal_format_precision_exception.go | 5 +++ java_exception/illegal_format_width_exception.go | 5 +++ java_exception/illegal_monitor_state_exception.go | 5 +++ java_exception/illegal_state_exception.go | 5 +++ java_exception/illegal_thread_state_exception.go | 5 +++ java_exception/illformed_locale_exception.go | 5 +++ java_exception/incomplete_annotation_exception.go | 5 +++ java_exception/index_out_of_bounds_exception.go| 5 +++ java_exception/input_mismatch_exception.go | 5 +++ java_exception/instantiation_exception.go | 5 +++ java_exception/interrupted_exception.go| 5 +++ java_exception/interrupted_io_exception.go | 5 +++ java_exception/invalid_class_exception.go | 5 +++ java_exception/invalid_object_exception.go | 5 +++ .../invalid_preferences_format_exception.go| 5 +++ .../invalid_properties_format_exception.go | 5 +++ java_exception/invocation_target_exception.go | 5 +++ java_exception/io_exception.go | 5 +++ java_exception/jar_exception.go| 5 +++ java_exception/lambda_conversion_exception.go | 5 +++ .../malformed_parameterized_type_exception.go | 5 +++ java_exception/malformed_parameters_exception.go | 5 +++ .../missing_format_argument_exception.go | 5 +++ java_exception/missing_format_width_exception.go | 5 +++ java_exception/missing_resource_exception.go | 5 +++ java_exception/negative_array_size_exception.go| 5 +++ java_exception/no_such_element_exception.go| 5 +++ java_exception/no_such_field_exception.go | 5 +++ java_exception/no_such_method_exception.go | 5 +++ java_exception/not_active_exception.go | 5 +++ java_exception/not_serializable_exception.go | 5 +++ java_exception/null_pointer_exception.go | 5 +++ java_exception/number_format_exception.go | 5 +++ java_exception/object_stream_exception.go | 5 +++ java_exception/optional_data_exception.go | 5 +++ java_exception/reflective_operation_exception.go | 5 +++ java_exception/rejected_execution_exception.go | 5 +++ java_exception/runtime_exception.go| 5 +++ java_exception/security_exception.go | 5 +++ java_exception/stream_corrupted_exception.go | 5 +++ .../string_index_out_of_bounds_exception.go| 5 +++ java_exception/sync_failed_exception.go| 5 +++ java_exception/timeout_exception.go| 5 +++ java_exception/too_many_listeners_exception.go | 5 +++ java_exception/type_not_present_exception.go | 5 +++
[dubbo-go-hessian2] 02/02: add unit test
This is an automated email from the ASF dual-hosted git repository. victory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git commit 4116f3b07ec181b00f045ab56d2ce49a5d1dd8c2 Author: cvictory AuthorDate: Wed Jul 1 10:56:24 2020 +0800 add unit test --- java_unknown_exception.go | 8 +--- java_unknown_exception_test.go | 43 ++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/java_unknown_exception.go b/java_unknown_exception.go index 45f5a00..5ea5a49 100644 --- a/java_unknown_exception.go +++ b/java_unknown_exception.go @@ -26,7 +26,9 @@ import ( "github.com/apache/dubbo-go-hessian2/java_exception" ) -var mutex sync.Mutex +var ( + expRegMutex sync.Mutex +) func checkAndGetException(cls classInfo) (structInfo, bool) { @@ -48,8 +50,8 @@ func checkAndGetException(cls classInfo) (structInfo, bool) { if throwable, ok = getStructInfo(cls.javaName); ok { return throwable, true } - mutex.Lock() - defer mutex.Unlock() + expRegMutex.Lock() + defer expRegMutex.Unlock() RegisterPOJO(newBizException(cls.javaName)) if throwable, ok = getStructInfo(cls.javaName); ok { return throwable, true diff --git a/java_unknown_exception_test.go b/java_unknown_exception_test.go new file mode 100644 index 000..fa14ed3 --- /dev/null +++ b/java_unknown_exception_test.go @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package hessian + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestCheckAndGetException(t *testing.T) { + clazzInfo1 := classInfo{ + javaName: "com.test.UserDefinedException", + fieldNameList: []string{"detailMessage", "code", "suppressedExceptions", "stackTrace", "cause"}, + } + s, b := checkAndGetException(clazzInfo1) + assert.True(t, b) + + assert.Equal(t, s.javaName, "com.test.UserDefinedException") + assert.Equal(t, s.goName, "hessian.UnknownException") + + clazzInfo2 := classInfo{ + javaName: "com.test.UserDefinedException", + fieldNameList: []string{"detailMessage", "code", "suppressedExceptions", "cause"}, + } + s, b = checkAndGetException(clazzInfo2) + assert.False(t, b) + assert.Equal(t, s, structInfo{}) +}
[dubbo] branch master updated (e0d031e -> bbacab0)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/dubbo.git. from e0d031e enhance ClusterInvoker & ExtensionLoader (#6343) add bbacab0 Enhancement, support Map auto recognize in PojoUtils (#6106) No new revisions were added by this update. Summary of changes: .../org/apache/dubbo/common/utils/PojoUtils.java | 36 +- .../apache/dubbo/common/utils/PojoUtilsTest.java | 36 ++ .../dubbo/qos/legacy/InvokerTelnetHandlerTest.java | 14 + .../dubbo/qos/legacy/service/DemoService.java | 2 ++ .../dubbo/qos/legacy/service/DemoServiceImpl.java | 5 +++ 5 files changed, 92 insertions(+), 1 deletion(-)
[dubbo] branch 2.7.8-dev updated: Fixes the issue of merging code in Github
This is an automated email from the ASF dual-hosted git repository. mercyblitz pushed a commit to branch 2.7.8-dev in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/2.7.8-dev by this push: new 6ae8c0e Fixes the issue of merging code in Github 6ae8c0e is described below commit 6ae8c0e037428b272826fa5f9100648b850445d9 Author: mercyblitz AuthorDate: Tue Jun 30 14:11:25 2020 +0800 Fixes the issue of merging code in Github --- .../src/main/java/org/apache/dubbo/config/context/ConfigManager.java | 5 - 1 file changed, 5 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java b/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java index 4bc1660..868fadc 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java @@ -522,9 +522,4 @@ public class ConfigManager extends LifecycleAdapter implements FrameworkExt { .filter(ConfigManager::isDefaultConfig) .collect(Collectors.toList()); } - -@Override -public void destroy() throws IllegalStateException { -clear(); -} }