Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 3695 #3709

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -48,8 +48,6 @@ class AnnotationBeanNameBuilder {

// Required properties

private final String category;

private final String protocol;

private final String interfaceClassName;
Expand All @@ -62,20 +60,19 @@ class AnnotationBeanNameBuilder {

private Environment environment;

private AnnotationBeanNameBuilder(String category, String protocol, String interfaceClassName) {
this.category = category;
private AnnotationBeanNameBuilder(String protocol, String interfaceClassName) {
this.protocol = protocol;
this.interfaceClassName = interfaceClassName;
}

private AnnotationBeanNameBuilder(Service service, Class<?> interfaceClass) {
this(PROVIDERS_CATEGORY, resolveProtocol(service.protocol()), resolveInterfaceName(service, interfaceClass));
this(resolveProtocol(service.protocol()), resolveInterfaceName(service, interfaceClass));
this.group(service.group());
this.version(service.version());
}

private AnnotationBeanNameBuilder(Reference reference, Class<?> interfaceClass) {
this(CONSUMERS_CATEGORY, resolveProtocol(reference.protocol()), resolveInterfaceName(reference, interfaceClass));
this(resolveProtocol(reference.protocol()), resolveInterfaceName(reference, interfaceClass));
this.group(reference.group());
this.version(reference.version());
}
Expand Down Expand Up @@ -129,7 +126,7 @@ private static String resolveProtocol(String... protocols) {
*/
public String build() {
// Append the required properties
StringBuilder beanNameBuilder = new StringBuilder(category);
StringBuilder beanNameBuilder = new StringBuilder("ServiceBean");
append(beanNameBuilder, protocol);
append(beanNameBuilder, interfaceClassName);
// Append the optional properties
Expand Down