Polishing
This commit is contained in:
parent
6f8a524eaa
commit
8ad5299f4a
|
@ -157,10 +157,7 @@ public abstract class MethodMatchers {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = 17;
|
||||
hashCode = 37 * hashCode + this.mm1.hashCode();
|
||||
hashCode = 37 * hashCode + this.mm2.hashCode();
|
||||
return hashCode;
|
||||
return 37 * this.mm1.hashCode() + this.mm2.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,14 +189,6 @@ public abstract class MethodMatchers {
|
|||
return (targetClass != null && this.cf2.matches(targetClass));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = 17;
|
||||
hashCode = 37 * hashCode + this.cf1.hashCode();
|
||||
hashCode = 37 * hashCode + this.cf2.hashCode();
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
|
@ -217,6 +206,14 @@ public abstract class MethodMatchers {
|
|||
}
|
||||
return (this.cf1.equals(otherCf1) && this.cf2.equals(otherCf2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = super.hashCode();
|
||||
hashCode = 37 * hashCode + this.cf1.hashCode();
|
||||
hashCode = 37 * hashCode + this.cf2.hashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -279,10 +276,7 @@ public abstract class MethodMatchers {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = 17;
|
||||
hashCode = 37 * hashCode + this.mm1.hashCode();
|
||||
hashCode = 37 * hashCode + this.mm2.hashCode();
|
||||
return hashCode;
|
||||
return 37 * this.mm1.hashCode() + this.mm2.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -390,12 +390,7 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = ObjectUtils.nullSafeHashCode(this.containingClass);
|
||||
result = prime * result + Boolean.hashCode(this.eager);
|
||||
result = prime * result + this.nestingLevel;
|
||||
result = prime * result + Boolean.hashCode(this.required);
|
||||
return result;
|
||||
return 31 * super.hashCode() + ObjectUtils.nullSafeHashCode(this.containingClass);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ import org.springframework.util.ClassUtils;
|
|||
* @see org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
|
||||
* @see org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
|
||||
*/
|
||||
public final class AnnotationConfigUtils {
|
||||
public abstract class AnnotationConfigUtils {
|
||||
|
||||
/**
|
||||
* The bean name of the internally managed Configuration annotation processor.
|
||||
|
@ -126,10 +126,6 @@ public final class AnnotationConfigUtils {
|
|||
ClassUtils.isPresent(PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME, AnnotationConfigUtils.class.getClassLoader());
|
||||
|
||||
|
||||
private AnnotationConfigUtils() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register all relevant annotation post processors in the given registry.
|
||||
* @param registry the registry to operate on
|
||||
|
|
|
@ -962,7 +962,7 @@ public class CodeFlow implements Opcodes {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns if the supplied array type has a core component reference type.
|
||||
* Return if the supplied array type has a core component reference type.
|
||||
*/
|
||||
public static boolean isReferenceTypeArray(String arraytype) {
|
||||
int length = arraytype.length();
|
||||
|
@ -1061,5 +1061,4 @@ public class CodeFlow implements Opcodes {
|
|||
void generateCode(MethodVisitor mv, CodeFlow codeflow);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -582,12 +582,7 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int prime = 31;
|
||||
int result = ObjectUtils.nullSafeHashCode(this.selector);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.noLocal);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.subscription);
|
||||
result = prime * result + Boolean.hashCode(this.durable);
|
||||
return result;
|
||||
return 31 * super.hashCode() + ObjectUtils.nullSafeHashCode(this.selector);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -123,6 +123,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
|
|||
String lookupPath = uriString.substring(0, queryIndex);
|
||||
String query = uriString.substring(queryIndex);
|
||||
PathContainer parsedLookupPath = PathContainer.parsePath(lookupPath);
|
||||
|
||||
return resolveResourceUrl(parsedLookupPath).map(resolvedPath ->
|
||||
request.getPath().contextPath().value() + resolvedPath + query);
|
||||
}
|
||||
|
@ -154,8 +155,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
|
|||
List<ResourceResolver> resolvers = handler.getResourceResolvers();
|
||||
ResourceResolverChain chain = new DefaultResourceResolverChain(resolvers);
|
||||
return chain.resolveUrlPath(path.value(), handler.getLocations())
|
||||
.map(resolvedPath -> mapping.value() + resolvedPath);
|
||||
|
||||
.map(resolvedPath -> mapping.value() + resolvedPath);
|
||||
})
|
||||
.orElseGet(() ->{
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
|
|
@ -51,23 +51,20 @@ import org.springframework.web.server.ServerWebInputException;
|
|||
*/
|
||||
public class RequestPartMethodArgumentResolver extends AbstractMessageReaderArgumentResolver {
|
||||
|
||||
public RequestPartMethodArgumentResolver(List<HttpMessageReader<?>> readers,
|
||||
ReactiveAdapterRegistry registry) {
|
||||
|
||||
public RequestPartMethodArgumentResolver(List<HttpMessageReader<?>> readers, ReactiveAdapterRegistry registry) {
|
||||
super(readers, registry);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
return parameter.hasParameterAnnotation(RequestPart.class) ||
|
||||
checkParameterType(parameter, Part.class::isAssignableFrom);
|
||||
return (parameter.hasParameterAnnotation(RequestPart.class) ||
|
||||
checkParameterType(parameter, Part.class::isAssignableFrom));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Mono<Object> resolveArgument(MethodParameter parameter, BindingContext bindingContext,
|
||||
ServerWebExchange exchange) {
|
||||
public Mono<Object> resolveArgument(
|
||||
MethodParameter parameter, BindingContext bindingContext, ServerWebExchange exchange) {
|
||||
|
||||
RequestPart requestPart = parameter.getParameterAnnotation(RequestPart.class);
|
||||
boolean isRequired = (requestPart == null || requestPart.required());
|
||||
|
|
Loading…
Reference in New Issue