Fixup checkstyle violations

See gh-33992
This commit is contained in:
Phillip Webb
2025-03-26 13:32:26 -07:00
committed by rstoyanchev
parent 92b0eb7f8b
commit 7c3618de7c
5 changed files with 13 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ import org.springframework.web.service.registry.HttpServiceGroupConfigurer;
/**
* Adapter for groups backed by {@link RestClient}.
*
*
* @author Rossen Stoyanchev
* @since 7.0
*/

View File

@@ -169,8 +169,8 @@ public abstract class AbstractHttpServiceRegistrar implements
private ClassPathScanningCandidateComponentProvider getScanner() {
if (this.scanner == null) {
Assert.state(environment != null, "Environment has not been set");
Assert.state(resourceLoader != null, "ResourceLoader has not been set");
Assert.state(this.environment != null, "Environment has not been set");
Assert.state(this.resourceLoader != null, "ResourceLoader has not been set");
this.scanner = new HttpExchangeClassPathScanningCandidateComponentProvider();
this.scanner.setEnvironment(this.environment);
this.scanner.setResourceLoader(this.resourceLoader);
@@ -302,14 +302,14 @@ public abstract class AbstractHttpServiceRegistrar implements
@Override
public GroupSpec register(Class<?>... serviceTypes) {
addHttpServiceTypes(groupName, clientType, serviceTypes);
addHttpServiceTypes(this.groupName, this.clientType, serviceTypes);
return this;
}
@Override
public GroupSpec detectInBasePackages(Class<?>... packageClasses) {
for (Class<?> packageClass : packageClasses) {
detect(groupName, clientType, packageClass.getPackageName());
detect(this.groupName, this.clientType, packageClass.getPackageName());
}
return this;
}
@@ -317,7 +317,7 @@ public abstract class AbstractHttpServiceRegistrar implements
@Override
public GroupSpec detectInBasePackages(String... packageNames) {
for (String packageName : packageNames) {
detect(groupName, clientType, packageName);
detect(this.groupName, this.clientType, packageName);
}
return this;
}

View File

@@ -69,10 +69,10 @@ public interface HttpServiceGroup {
/**
* Not specified, falling back on a default.
* @see ImportHttpServices#clientType()
* @see HttpServiceGroups#clientType()
* @see HttpServiceGroups#clientType()
* @see AbstractHttpServiceRegistrar#setDefaultClientType
*/
UNSPECIFIED;
UNSPECIFIED
}
}

View File

@@ -89,14 +89,13 @@ public final class HttpServiceProxyRegistryFactoryBean
Assert.notNull(this.applicationContext, "ApplicationContext not initialized");
// Set client builders
groupAdapters.forEach((clientType, groupAdapter) -> {
this.groupAdapters.forEach((clientType, groupAdapter) ->
this.groupSet.stream()
.filter(group -> group.clientType().equals(clientType))
.forEach(group -> group.initialize(groupAdapter));
});
.forEach(group -> group.initialize(groupAdapter)));
// Apply group configurers
groupAdapters.forEach((clientType, groupAdapter) -> {
this.groupAdapters.forEach((clientType, groupAdapter) -> {
Collection<? extends HttpServiceGroupConfigurer<?>> configurers =
this.applicationContext.getBeansOfType(groupAdapter.getConfigurerType()).values();
@@ -181,7 +180,7 @@ public final class HttpServiceProxyRegistryFactoryBean
return this.declaredGroup.clientType();
}
public <CB> void initialize(HttpServiceGroupAdapter<?> adapter) {
public void initialize(HttpServiceGroupAdapter<?> adapter) {
this.clientBuilder = adapter.createClientBuilder();
this.groupAdapter = adapter;
}

View File

@@ -28,7 +28,7 @@ import org.springframework.core.annotation.AliasFor;
import org.springframework.web.service.annotation.HttpExchange;
/**
* Annotation to identify HTTP Service types (interfaces with
* Annotation to declare HTTP Service types (interfaces with
* {@link HttpExchange @HttpExchange} methods) for which to create client proxies,
* and have those proxies registered as beans.
*