This is an automated email from the ASF dual-hosted git repository.

huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 616f629  Such logic already exists in findAnnotationName (#1750)
616f629 is described below

commit 616f6290a2b4e33fe96b241a10a82568d192a57b
Author: JackCaptain1015 <[email protected]>
AuthorDate: Sat May 12 20:48:17 2018 +0800

    Such logic already exists in findAnnotationName (#1750)
---
 .../java/com/alibaba/dubbo/common/extension/ExtensionLoader.java   | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git 
a/dubbo-common/src/main/java/com/alibaba/dubbo/common/extension/ExtensionLoader.java
 
b/dubbo-common/src/main/java/com/alibaba/dubbo/common/extension/ExtensionLoader.java
index b5d0e20..9be012d 100644
--- 
a/dubbo-common/src/main/java/com/alibaba/dubbo/common/extension/ExtensionLoader.java
+++ 
b/dubbo-common/src/main/java/com/alibaba/dubbo/common/extension/ExtensionLoader.java
@@ -665,12 +665,7 @@ public class ExtensionLoader<T> {
             if (name == null || name.length() == 0) {
                 name = findAnnotationName(clazz);
                 if (name == null || name.length() == 0) {
-                    if (clazz.getSimpleName().length() > 
type.getSimpleName().length()
-                            && 
clazz.getSimpleName().endsWith(type.getSimpleName())) {
-                        name = clazz.getSimpleName().substring(0, 
clazz.getSimpleName().length() - type.getSimpleName().length()).toLowerCase();
-                    } else {
-                        throw new IllegalStateException("No such extension 
name for the class " + clazz.getName() + " in the config " + resourceURL);
-                    }
+                    throw new IllegalStateException("No such extension name 
for the class " + clazz.getName() + " in the config " + resourceURL);
                 }
             }
             String[] names = NAME_SEPARATOR.split(name);

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to