Polishing

See gh-28386
This commit is contained in:
rstoyanchev
2022-04-21 21:04:17 +00:00
parent 4bddbd30c4
commit bb44c0e13a
8 changed files with 11 additions and 13 deletions

View File

@@ -26,6 +26,7 @@ import org.springframework.core.annotation.AliasFor;
/**
* Shortcut for {@link HttpRequest} for HTTP GET requests.
*
* @author Rossen Stoyanchev
* @since 6.0

View File

@@ -25,6 +25,7 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/**
* Shortcut for {@link HttpRequest} for HTTP POST requests.
*
* @author Rossen Stoyanchev
* @since 6.0

View File

@@ -25,6 +25,7 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/**
* Shortcut for {@link HttpRequest} for HTTP PUT requests.
*
* @author Rossen Stoyanchev
* @since 6.0

View File

@@ -28,7 +28,6 @@ import org.reactivestreams.Publisher;
import org.springframework.core.MethodParameter;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.ResolvableType;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpRequest;
@@ -56,7 +55,7 @@ public class HttpRequestDefinition {
@Nullable
private URI uri;
@Nullable
private String uriTemplate;
@@ -80,7 +79,7 @@ public class HttpRequestDefinition {
@Nullable
private Publisher<?> bodyPublisher;
@Nullable
private ParameterizedTypeReference<?> bodyPublisherElementType;

View File

@@ -24,8 +24,6 @@ import java.util.Map;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.core.MethodIntrospector;
@@ -91,7 +89,7 @@ public class HttpServiceProxyFactory {
/**
*
* {@link MethodInterceptor} that invokes an {@link HttpServiceMethod}.
*/
private static final class HttpServiceMethodInterceptor implements MethodInterceptor {
@@ -101,9 +99,8 @@ public class HttpServiceProxyFactory {
methods.forEach(serviceMethod -> this.serviceMethodMap.put(serviceMethod.getMethod(), serviceMethod));
}
@Nullable
@Override
public Object invoke(@NotNull MethodInvocation invocation) throws Throwable {
public Object invoke(MethodInvocation invocation) throws Throwable {
Method method = invocation.getMethod();
HttpServiceMethod httpServiceMethod = this.serviceMethodMap.get(method);
return httpServiceMethod.invoke(invocation.getArguments());

View File

@@ -1,5 +1,6 @@
/**
*
* Support to create a client proxy for an HTTP service annotated with
* {@link org.springframework.web.service.annotation.HttpRequest} methods.
*/
@NonNullApi
@NonNullFields