You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/05/12 12:48:18 UTC
[GitHub] ralf0131 closed pull request #1750: Such logic already exists in
findAnnotationName
ralf0131 closed pull request #1750: Such logic already exists in findAnnotationName
URL: https://github.com/apache/incubator-dubbo/pull/1750
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 b5d0e209e8..9be012dc35 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 @@ private void loadClass(Map<String, Class<?>> extensionClasses, java.net.URL reso
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);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org