Browse Source

Merge branch '5.3.x'

pull/27482/head
Sam Brannen 5 years ago
parent
commit
16bf39ea1b
  1. 5
      build.gradle
  2. 4
      spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java
  3. 8
      spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java
  4. 6
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java
  5. 2
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java
  6. 2
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java
  7. 4
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyBean.java
  8. 3
      spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java
  9. 1
      spring-context/src/main/java/org/springframework/scheduling/support/CronExpression.java
  10. 1
      spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java
  11. 1
      spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java
  12. 3
      spring-core/src/jmh/java/org/springframework/core/codec/StringDecoderBenchmark.java
  13. 2
      spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java
  14. 1
      spring-core/src/main/java/org/springframework/core/codec/DecodingException.java
  15. 1
      spring-core/src/main/java/org/springframework/core/codec/EncodingException.java
  16. 16
      spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java
  17. 3
      spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferLimitException.java
  18. 3
      spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java
  19. 3
      spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java
  20. 3
      spring-core/src/test/java/org/springframework/core/io/buffer/LimitedDataBufferListTests.java
  21. 3
      spring-core/src/test/java/org/springframework/util/concurrent/MonoToListenableFutureAdapterTests.java
  22. 15
      spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java
  23. 11
      spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java
  24. 5
      spring-expression/src/test/java/org/springframework/expression/spel/testdata/PersonInOtherPackage.java
  25. 3
      spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java
  26. 9
      spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java
  27. 1
      spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandler.java
  28. 2
      spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/PayloadMethodArgumentResolver.java
  29. 1
      spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java
  30. 1
      spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataExtractor.java
  31. 1
      spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketConnectorConfigurer.java
  32. 1
      spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketFrameTypeMessageCondition.java
  33. 1
      spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java
  34. 4
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
  35. 1
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompConversionException.java
  36. 1
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompReactorNettyCodec.java
  37. 1
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompTcpConnectionHandler.java
  38. 1
      spring-messaging/src/main/java/org/springframework/messaging/simp/user/DestinationUserNameProvider.java
  39. 1
      spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java
  40. 1
      spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/MessagingPredicates.java
  41. 1
      spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandlerTests.java
  42. 1
      spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/PayloadMethodArgumentResolverTests.java
  43. 1
      spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/TestExceptionResolver.java
  44. 1
      spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/EncoderMethodReturnValueHandlerTests.java
  45. 2
      spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java
  46. 1
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultMetadataExtractorTests.java
  47. 1
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java
  48. 1
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java
  49. 1
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java
  50. 1
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandlerTests.java
  51. 1
      spring-test/src/main/java/org/springframework/mock/http/client/reactive/MockClientHttpRequest.java
  52. 1
      spring-test/src/main/java/org/springframework/test/context/support/PropertyProvider.java
  53. 7
      spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java
  54. 1
      spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java
  55. 1
      spring-test/src/main/java/org/springframework/test/context/util/TestContextResourceUtils.java
  56. 1
      spring-test/src/main/java/org/springframework/test/web/client/RequestExpectationManager.java
  57. 1
      spring-test/src/main/java/org/springframework/test/web/reactive/server/MockServerClientHttpResponse.java
  58. 1
      spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java
  59. 3
      spring-test/src/main/java/org/springframework/test/web/servlet/ResultActions.java
  60. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java
  61. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/SmartRequestBuilder.java
  62. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/client/AbstractMockMvcServerSpec.java
  63. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/client/ApplicationContextMockMvcSpec.java
  64. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcHttpConnector.java
  65. 3
      spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java
  66. 1
      spring-test/src/main/java/org/springframework/test/web/servlet/client/StandaloneMockMvcSpec.java
  67. 1
      spring-test/src/test/java/org/springframework/test/web/client/samples/SampleTests.java
  68. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/ApplicationContextSpecTests.java
  69. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/CookieAssertionTests.java
  70. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/DefaultRouterFunctionSpecTests.java
  71. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/MockServerSpecTests.java
  72. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/MockServerTests.java
  73. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/ExchangeMutatorTests.java
  74. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/GlobalEntityResultConsumerTests.java
  75. 1
      spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/Person.java
  76. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/result/HeaderResultMatchersTests.java
  77. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/AsyncTests.java
  78. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/ReactiveReturnTypeTests.java
  79. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/RequestParameterTests.java
  80. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/SseTests.java
  81. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/ReactiveReturnTypeTests.java
  82. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/RequestParameterTests.java
  83. 4
      spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java
  84. 2
      spring-web/src/main/java/org/springframework/http/client/reactive/JettyResourceFactory.java
  85. 1
      spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartWriterSupport.java
  86. 5
      spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java
  87. 1
      spring-web/src/main/java/org/springframework/http/server/RequestPath.java
  88. 1
      spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponseDecorator.java
  89. 1
      spring-web/src/main/java/org/springframework/web/bind/MissingRequestValueException.java
  90. 1
      spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
  91. 1
      spring-web/src/main/java/org/springframework/web/client/RestOperations.java
  92. 2
      spring-web/src/main/java/org/springframework/web/context/request/AsyncWebRequestInterceptor.java
  93. 1
      spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java
  94. 1
      spring-web/src/main/java/org/springframework/web/cors/reactive/PreFlightRequestWebFilter.java
  95. 1
      spring-web/src/main/java/org/springframework/web/filter/RelativeRedirectResponseWrapper.java
  96. 1
      spring-web/src/main/java/org/springframework/web/filter/ServletRequestPathFilter.java
  97. 1
      spring-web/src/main/java/org/springframework/web/server/ServerWebExchangeDecorator.java
  98. 6
      spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java
  99. 1
      spring-web/src/main/java/org/springframework/web/util/WebUtils.java
  100. 2
      spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java
  101. Some files were not shown because too many files have changed in this diff Show More

5
build.gradle

@ -301,7 +301,7 @@ configure([rootProject] + javaProjects) { project -> @@ -301,7 +301,7 @@ configure([rootProject] + javaProjects) { project ->
}
checkstyle {
toolVersion = "9.0"
toolVersion = "8.41"
configDirectory.set(rootProject.file("src/checkstyle"))
}
@ -323,7 +323,8 @@ configure([rootProject] + javaProjects) { project -> @@ -323,7 +323,8 @@ configure([rootProject] + javaProjects) { project ->
// JSR-305 only used for non-required meta-annotations
compileOnly("com.google.code.findbugs:jsr305")
testCompileOnly("com.google.code.findbugs:jsr305")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.15")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.28")
checkstyle("com.puppycrawl.tools:checkstyle:8.41")
}
ext.javadocLinks = [

4
spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -146,7 +146,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher @@ -146,7 +146,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
@Override
public String toString() {
return getClass().getName() + ": class = " + this.clazz.getName() + "; methodName = " + methodName;
return getClass().getName() + ": class = " + this.clazz.getName() + "; methodName = " + this.methodName;
}
}

8
spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.support;
import org.junit.jupiter.api.Test;
@ -29,10 +30,10 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -29,10 +30,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Rob Harrop
* @author Rick Evans
*/
public class ClassUtilsTests {
class ClassUtilsTests {
@Test
public void getShortNameForCglibClass() {
void getShortNameForCglibClass() {
TestBean tb = new TestBean();
ProxyFactory pf = new ProxyFactory();
pf.setTarget(tb);
@ -41,4 +42,5 @@ public class ClassUtilsTests { @@ -41,4 +42,5 @@ public class ClassUtilsTests {
String className = ClassUtils.getShortName(proxy.getClass());
assertThat(className).as("Class name did not match").isEqualTo("TestBean");
}
}

6
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2021 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.
@ -13,14 +13,14 @@ @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.aspectj;
/**
* Marker interface for domain object that need DI through aspects.
* Marker interface for domain objects that need DI through aspects.
*
* @author Ramnivas Laddad
* @since 2.5
*/
public interface ConfigurableObject {
}

2
spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import org.springframework.transaction.annotation.Transactional;
@ -29,4 +30,5 @@ public class ClassWithPrivateAnnotatedMember { @@ -29,4 +30,5 @@ public class ClassWithPrivateAnnotatedMember {
@Transactional
private void doInTransaction() {}
}

2
spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import org.springframework.transaction.annotation.Transactional;
@ -29,4 +30,5 @@ public class ClassWithProtectedAnnotatedMember { @@ -29,4 +30,5 @@ public class ClassWithProtectedAnnotatedMember {
@Transactional
protected void doInTransaction() {}
}

4
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyBean.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.testfixture.beans;
/**
@ -65,4 +66,5 @@ public class DummyBean { @@ -65,4 +66,5 @@ public class DummyBean {
public TestBean getSpouse() {
return spouse;
}
}

3
spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.format;
import org.springframework.core.convert.converter.Converter;

1
spring-context/src/main/java/org/springframework/scheduling/support/CronExpression.java

@ -171,7 +171,6 @@ public final class CronExpression { @@ -171,7 +171,6 @@ public final class CronExpression {
* <li>{@code "@daily"} (or {@code "@midnight"}) to run once a day, i.e. {@code "0 0 0 * * *"},</li>
* <li>{@code "@hourly"} to run once an hour, i.e. {@code "0 0 * * * *"}.</li>
* </ul>
*
* @param expression the expression string to parse
* @return the parsed {@code CronExpression} object
* @throws IllegalArgumentException in the expression does not conform to

1
spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.aspectj.lang.ProceedingJoinPoint;

1
spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.context.annotation;
import org.junit.jupiter.api.Test;

3
spring-core/src/jmh/java/org/springframework/core/codec/StringDecoderBenchmark.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.codec;
import java.nio.charset.Charset;

2
spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java

@ -573,7 +573,7 @@ final class TypeMappedAnnotation<A extends Annotation> extends AbstractMergedAnn @@ -573,7 +573,7 @@ final class TypeMappedAnnotation<A extends Annotation> extends AbstractMergedAnn
}
if (this.source != null) {
if (this.source instanceof Class) {
return ((Class<?>) source).getClassLoader();
return ((Class<?>) this.source).getClassLoader();
}
if (this.source instanceof Member) {
((Member) this.source).getDeclaringClass().getClassLoader();

1
spring-core/src/main/java/org/springframework/core/codec/DecodingException.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.codec;
import org.springframework.lang.Nullable;

1
spring-core/src/main/java/org/springframework/core/codec/EncodingException.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.codec;
import org.springframework.lang.Nullable;

16
spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java vendored

@ -136,7 +136,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -136,7 +136,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
customizePropertySources(propertySources);
}
/**
* Factory method used to create the {@link ConfigurablePropertyResolver}
* instance used by the Environment.
@ -166,6 +165,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -166,6 +165,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* sources using {@link MutablePropertySources#addLast(PropertySource)} such that
* further subclasses may call {@code super.customizePropertySources()} with
* predictable results. For example:
*
* <pre class="code">
* public class Level1Environment extends AbstractEnvironment {
* &#064;Override
@ -185,11 +185,13 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -185,11 +185,13 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* }
* }
* </pre>
* In this arrangement, properties will be resolved against sources A, B, C, D in that
*
* <p>In this arrangement, properties will be resolved against sources A, B, C, D in that
* order. That is to say that property source "A" has precedence over property source
* "D". If the {@code Level2Environment} subclass wished to give property sources C
* and D higher precedence than A and B, it could simply call
* {@code super.customizePropertySources} after, rather than before adding its own:
*
* <pre class="code">
* public class Level2Environment extends Level1Environment {
* &#064;Override
@ -200,25 +202,24 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -200,25 +202,24 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* }
* }
* </pre>
* The search order is now C, D, A, B as desired.
*
* <p>Beyond these recommendations, subclasses may use any of the {@code add&#42;},
* <p>The search order is now C, D, A, B as desired.
* <p>Beyond these recommendations, subclasses may use any of the {@code add*},
* {@code remove}, or {@code replace} methods exposed by {@link MutablePropertySources}
* in order to create the exact arrangement of property sources desired.
*
* <p>The base implementation registers no property sources.
*
* <p>Note that clients of any {@link ConfigurableEnvironment} may further customize
* property sources via the {@link #getPropertySources()} accessor, typically within
* an {@link org.springframework.context.ApplicationContextInitializer
* ApplicationContextInitializer}. For example:
*
* <pre class="code">
* ConfigurableEnvironment env = new StandardEnvironment();
* env.getPropertySources().addLast(new PropertySourceX(...));
* </pre>
*
* <h2>A warning about instance variable access</h2>
* Instance variables declared in subclasses and having default initial values should
* <p>Instance variables declared in subclasses and having default initial values should
* <em>not</em> be accessed from within this method. Due to Java object creation
* lifecycle constraints, any initial value will not yet be assigned when this
* callback is invoked by the {@link #AbstractEnvironment()} constructor, which may
@ -227,7 +228,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -227,7 +228,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* property source manipulation and instance variable access directly within the
* subclass constructor. Note that <em>assigning</em> values to instance variables is
* not problematic; it is only attempting to read default values that must be avoided.
*
* @see MutablePropertySources
* @see PropertySourcesPropertyResolver
* @see org.springframework.context.ApplicationContextInitializer

3
spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferLimitException.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.io.buffer;
/**

3
spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.io.buffer;
import java.util.ArrayList;

3
spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core;
import java.lang.reflect.Method;

3
spring-core/src/test/java/org/springframework/core/io/buffer/LimitedDataBufferListTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.io.buffer;
import java.nio.charset.StandardCharsets;

3
spring-core/src/test/java/org/springframework/util/concurrent/MonoToListenableFutureAdapterTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.util.concurrent;
import java.time.Duration;

15
spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel;
import java.math.BigDecimal;
@ -31,10 +32,10 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -31,10 +32,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Clement
* @author Giovanni Dall'Oglio Risso
*/
public class DefaultComparatorUnitTests {
class DefaultComparatorUnitTests {
@Test
public void testPrimitives() throws EvaluationException {
void testPrimitives() throws EvaluationException {
TypeComparator comparator = new StandardTypeComparator();
// primitive int
assertThat(comparator.compare(1, 2) < 0).isTrue();
@ -63,7 +64,7 @@ public class DefaultComparatorUnitTests { @@ -63,7 +64,7 @@ public class DefaultComparatorUnitTests {
}
@Test
public void testNonPrimitiveNumbers() throws EvaluationException {
void testNonPrimitiveNumbers() throws EvaluationException {
TypeComparator comparator = new StandardTypeComparator();
BigDecimal bdOne = new BigDecimal("1");
@ -92,7 +93,7 @@ public class DefaultComparatorUnitTests { @@ -92,7 +93,7 @@ public class DefaultComparatorUnitTests {
}
@Test
public void testNulls() throws EvaluationException {
void testNulls() throws EvaluationException {
TypeComparator comparator = new StandardTypeComparator();
assertThat(comparator.compare(null,"abc")<0).isTrue();
assertThat(comparator.compare(null,null)==0).isTrue();
@ -100,7 +101,7 @@ public class DefaultComparatorUnitTests { @@ -100,7 +101,7 @@ public class DefaultComparatorUnitTests {
}
@Test
public void testObjects() throws EvaluationException {
void testObjects() throws EvaluationException {
TypeComparator comparator = new StandardTypeComparator();
assertThat(comparator.compare("a","a")==0).isTrue();
assertThat(comparator.compare("a","b")<0).isTrue();
@ -108,7 +109,7 @@ public class DefaultComparatorUnitTests { @@ -108,7 +109,7 @@ public class DefaultComparatorUnitTests {
}
@Test
public void testCanCompare() throws EvaluationException {
void testCanCompare() throws EvaluationException {
TypeComparator comparator = new StandardTypeComparator();
assertThat(comparator.canCompare(null,1)).isTrue();
assertThat(comparator.canCompare(1,null)).isTrue();

11
spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel;
import java.util.List;
@ -26,14 +27,14 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -26,14 +27,14 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
/**
* Unit tests for type comparison
* Unit tests for type comparison.
*
* @author Andy Clement
*/
public class StandardTypeLocatorTests {
class StandardTypeLocatorTests {
@Test
public void testImports() throws EvaluationException {
void testImports() throws EvaluationException {
StandardTypeLocator locator = new StandardTypeLocator();
assertThat(locator.findType("java.lang.Integer")).isEqualTo(Integer.class);
assertThat(locator.findType("java.lang.String")).isEqualTo(String.class);
@ -45,7 +46,7 @@ public class StandardTypeLocatorTests { @@ -45,7 +46,7 @@ public class StandardTypeLocatorTests {
assertThat(locator.findType("Boolean")).isEqualTo(Boolean.class);
// currently does not know about java.util by default
// assertEquals(java.util.List.class,locator.findType("List"));
// assertEquals(java.util.List.class,locator.findType("List"));
assertThatExceptionOfType(SpelEvaluationException.class).isThrownBy(() ->
locator.findType("URL"))

5
spring-expression/src/test/java/org/springframework/expression/spel/testdata/PersonInOtherPackage.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2014-2018 the original author or authors.
* Copyright 2014-2021 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.
@ -13,10 +13,10 @@ @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel.testdata;
/**
*
* @author Andy Clement
* @since 4.1.2
*/
@ -35,4 +35,5 @@ public class PersonInOtherPackage { @@ -35,4 +35,5 @@ public class PersonInOtherPackage {
public void setAge(int age) {
this.age = age;
}
}

3
spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 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.
@ -68,7 +68,6 @@ public interface CallableStatementCallback<T> { @@ -68,7 +68,6 @@ public interface CallableStatementCallback<T> {
* a domain object or a collection of domain objects. A thrown RuntimeException
* is treated as application exception: it gets propagated to the caller of
* the template.
*
* @param cs active JDBC CallableStatement
* @return a result object, or {@code null} if none
* @throws SQLException if thrown by a JDBC method, to be auto-converted

9
spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jms.core.support;
import java.util.ArrayList;
@ -30,10 +31,10 @@ import static org.mockito.Mockito.mock; @@ -30,10 +31,10 @@ import static org.mockito.Mockito.mock;
* @author Mark Pollack
* @since 24.9.2004
*/
public class JmsGatewaySupportTests {
class JmsGatewaySupportTests {
@Test
public void testJmsGatewaySupportWithConnectionFactory() throws Exception {
void testJmsGatewaySupportWithConnectionFactory() throws Exception {
ConnectionFactory mockConnectionFactory = mock(ConnectionFactory.class);
final List<String> test = new ArrayList<>(1);
JmsGatewaySupport gateway = new JmsGatewaySupport() {
@ -50,7 +51,7 @@ public class JmsGatewaySupportTests { @@ -50,7 +51,7 @@ public class JmsGatewaySupportTests {
}
@Test
public void testJmsGatewaySupportWithJmsTemplate() throws Exception {
void testJmsGatewaySupportWithJmsTemplate() throws Exception {
JmsTemplate template = new JmsTemplate();
final List<String> test = new ArrayList<>(1);
JmsGatewaySupport gateway = new JmsGatewaySupport() {

1
spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandler.java

@ -208,7 +208,6 @@ public class MessageMappingMessageHandler extends AbstractMethodMessageHandler<C @@ -208,7 +208,6 @@ public class MessageMappingMessageHandler extends AbstractMethodMessageHandler<C
* // delegate all methods
* }
* </pre>
*
* @param bean the bean to check for {@code @MessageExceptionHandler} methods
* @since 5.3.5
*/

2
spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/PayloadMethodArgumentResolver.java

@ -146,11 +146,9 @@ public class PayloadMethodArgumentResolver implements HandlerMethodArgumentResol @@ -146,11 +146,9 @@ public class PayloadMethodArgumentResolver implements HandlerMethodArgumentResol
* {@code @jakarta.validation.Valid} or
* {@link org.springframework.validation.annotation.Validated}. Validation
* failure results in an {@link MethodArgumentNotValidException}.
*
* @param parameter the target method argument that we are decoding to
* @param message the message from which the content was extracted
* @return a Mono with the result of argument resolution
*
* @see #extractContent(MethodParameter, Message)
* @see #getMimeType(Message)
*/

1
spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.util.ArrayList;

1
spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataExtractor.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.util.Map;

1
spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketConnectorConfigurer.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import io.rsocket.core.RSocketConnector;

1
spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketFrameTypeMessageCondition.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket.annotation.support;
import java.util.Arrays;

1
spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java

@ -471,7 +471,6 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler { @@ -471,7 +471,6 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {
* for more advanced scenarios, e.g. discovering handlers through a custom
* stereotype annotation, consider declaring {@code RSocketMessageHandler}
* as a bean, and then obtain the responder from it.
*
* @param strategies the strategies to set on the created
* {@code RSocketMessageHandler}
* @param candidateHandlers a list of Objects and/or Classes with annotated

4
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -797,7 +797,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler @@ -797,7 +797,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
* @since 5.3
*/
void updateClientSendMessageCount(long now) {
if (this.clientSendMessageCount != null && this.clientSendInterval > (now - clientSendMessageTimestamp)) {
if (this.clientSendMessageCount != null && this.clientSendInterval > (now - this.clientSendMessageTimestamp)) {
this.clientSendMessageCount.set(0);
this.clientSendMessageTimestamp = now;
}

1
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompConversionException.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.simp.stomp;
import org.springframework.core.NestedRuntimeException;

1
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompReactorNettyCodec.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.simp.stomp;
import java.nio.ByteBuffer;

1
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompTcpConnectionHandler.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.simp.stomp;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;

1
spring-messaging/src/main/java/org/springframework/messaging/simp/user/DestinationUserNameProvider.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.simp.user;
/**

1
spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.tcp.reactor;
import java.util.Collection;

1
spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/MessagingPredicates.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.annotation;
import java.util.function.Predicate;

1
spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandlerTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.annotation.reactive;
import java.time.Duration;

1
spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/PayloadMethodArgumentResolverTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.annotation.reactive;
import java.nio.charset.StandardCharsets;

1
spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/TestExceptionResolver.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.invocation;
import java.lang.reflect.Method;

1
spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/EncoderMethodReturnValueHandlerTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.invocation.reactive;
import java.util.Collections;

2
spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.invocation.reactive;
import java.util.List;
@ -65,4 +66,5 @@ public class TestEncoderMethodReturnValueHandler extends AbstractEncoderMethodRe @@ -65,4 +66,5 @@ public class TestEncoderMethodReturnValueHandler extends AbstractEncoderMethodRe
this.encodedContent = Flux.empty();
return Mono.empty();
}
}

1
spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultMetadataExtractorTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.nio.charset.StandardCharsets;

1
spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.time.Duration;

1
spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.time.Duration;

1
spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.nio.charset.StandardCharsets;

1
spring-messaging/src/test/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandlerTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket.annotation.support;
import java.util.Arrays;

1
spring-test/src/main/java/org/springframework/mock/http/client/reactive/MockClientHttpRequest.java

@ -79,7 +79,6 @@ public class MockClientHttpRequest extends AbstractClientHttpRequest { @@ -79,7 +79,6 @@ public class MockClientHttpRequest extends AbstractClientHttpRequest {
* <p>The default write handler consumes and caches the request body so it
* may be accessed subsequently, e.g. in test assertions. Use this property
* when the request body is an infinite stream.
*
* @param writeHandler the write handler to use returning {@code Mono<Void>}
* when the body has been "written" (i.e. consumed).
*/

1
spring-test/src/main/java/org/springframework/test/context/support/PropertyProvider.java

@ -32,7 +32,6 @@ public interface PropertyProvider { @@ -32,7 +32,6 @@ public interface PropertyProvider {
/**
* Get the value of the named property.
*
* @param name the name of the property to retrieve
* @return the value of the property or {@code null} if not found
*/

7
spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java

@ -44,10 +44,8 @@ public abstract class TestConstructorUtils { @@ -44,10 +44,8 @@ public abstract class TestConstructorUtils {
/**
* Determine if the supplied executable for the given test class is an
* autowirable constructor.
*
* <p>This method delegates to {@link #isAutowirableConstructor(Executable, Class, PropertyProvider)}
* will a value of {@code null} for the fallback {@link PropertyProvider}.
*
* @param executable an executable for the test class
* @param testClass the test class
* @return {@code true} if the executable is an autowirable constructor
@ -60,10 +58,8 @@ public abstract class TestConstructorUtils { @@ -60,10 +58,8 @@ public abstract class TestConstructorUtils {
/**
* Determine if the supplied constructor for the given test class is
* autowirable.
*
* <p>This method delegates to {@link #isAutowirableConstructor(Constructor, Class, PropertyProvider)}
* will a value of {@code null} for the fallback {@link PropertyProvider}.
*
* @param constructor a constructor for the test class
* @param testClass the test class
* @return {@code true} if the constructor is autowirable
@ -76,10 +72,8 @@ public abstract class TestConstructorUtils { @@ -76,10 +72,8 @@ public abstract class TestConstructorUtils {
/**
* Determine if the supplied executable for the given test class is an
* autowirable constructor.
*
* <p>This method delegates to {@link #isAutowirableConstructor(Constructor, Class, PropertyProvider)}
* if the supplied executable is a constructor and otherwise returns {@code false}.
*
* @param executable an executable for the test class
* @param testClass the test class
* @param fallbackPropertyProvider fallback property provider used to look up
@ -114,7 +108,6 @@ public abstract class TestConstructorUtils { @@ -114,7 +108,6 @@ public abstract class TestConstructorUtils {
* {@link PropertyProvider} (see
* {@link TestConstructor#TEST_CONSTRUCTOR_AUTOWIRE_MODE_PROPERTY_NAME}).</li>
* </ol>
*
* @param constructor a constructor for the test class
* @param testClass the test class
* @param fallbackPropertyProvider fallback property provider used to look up

1
spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java

@ -203,7 +203,6 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App @@ -203,7 +203,6 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App
* Delegates to the configured {@link TestContextManager} to
* {@linkplain TestContextManager#afterTestMethod(Object, Method, Throwable)
* post-process} the test method after the actual test has executed.
*
* @param testMethod the test method which has just been executed on the
* test instance
* @throws Exception allows all exceptions to propagate

1
spring-test/src/main/java/org/springframework/test/context/util/TestContextResourceUtils.java

@ -52,7 +52,6 @@ public abstract class TestContextResourceUtils { @@ -52,7 +52,6 @@ public abstract class TestContextResourceUtils {
/**
* Convert the supplied paths to classpath resource paths.
*
* <p>Delegates to {@link #convertToClasspathResourcePaths(Class, boolean, String...)}
* with {@code false} supplied for the {@code preservePlaceholders} flag.
* @param clazz the class with which the paths are associated

1
spring-test/src/main/java/org/springframework/test/web/client/RequestExpectationManager.java

@ -42,7 +42,6 @@ public interface RequestExpectationManager { @@ -42,7 +42,6 @@ public interface RequestExpectationManager {
* used to add more expectations and define a response.
* <p>This is a delegate for
* {@link MockRestServiceServer#expect(ExpectedCount, RequestMatcher)}.
*
* @param requestMatcher a request expectation
* @return for setting up further expectations and define a response
* @see MockRestServiceServer#expect(RequestMatcher)

1
spring-test/src/main/java/org/springframework/test/web/reactive/server/MockServerClientHttpResponse.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import org.springframework.http.client.reactive.ClientHttpResponse;

1
spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java

@ -862,7 +862,6 @@ public interface WebTestClient { @@ -862,7 +862,6 @@ public interface WebTestClient {
/**
* Exit the chained flow in order to consume the response body
* externally, e.g. via {@link reactor.test.StepVerifier}.
*
* <p>Note that when {@code Void.class} is passed in, the response body
* is consumed and released. If no content is expected, then consider
* using {@code .expectBody().isEmpty()} instead which asserts that

3
spring-test/src/main/java/org/springframework/test/web/servlet/ResultActions.java

@ -47,7 +47,6 @@ public interface ResultActions { @@ -47,7 +47,6 @@ public interface ResultActions {
* .andExpect(content().contentType(MediaType.APPLICATION_JSON))
* .andExpect(jsonPath("$.person.name").value("Jason"));
* </pre>
*
* @see #andExpectAll(ResultMatcher...)
*/
ResultActions andExpect(ResultMatcher matcher) throws Exception;
@ -78,7 +77,6 @@ public interface ResultActions { @@ -78,7 +77,6 @@ public interface ResultActions {
* jsonPath("$.person.name").value("Jason")
* );
* </pre>
*
* @since 5.3.10
* @see #andExpect(ResultMatcher)
*/
@ -105,7 +103,6 @@ public interface ResultActions { @@ -105,7 +103,6 @@ public interface ResultActions {
/**
* Return the result of the executed request for direct access to the results.
*
* @return the result of the request
*/
MvcResult andReturn();

1
spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java

@ -49,7 +49,6 @@ public interface ResultHandler { @@ -49,7 +49,6 @@ public interface ResultHandler {
/**
* Perform an action on the given result.
*
* @param result the result of the executed request
* @throws Exception if a failure occurs
*/

1
spring-test/src/main/java/org/springframework/test/web/servlet/SmartRequestBuilder.java

@ -31,7 +31,6 @@ public interface SmartRequestBuilder extends RequestBuilder { @@ -31,7 +31,6 @@ public interface SmartRequestBuilder extends RequestBuilder {
/**
* Apply request post processing. Typically that means invoking one or more
* {@link org.springframework.test.web.servlet.request.RequestPostProcessor org.springframework.test.web.servlet.request.RequestPostProcessors}.
*
* @param request the request to initialize
* @return the request to use, either the one passed in or a wrapped one
*/

1
spring-test/src/main/java/org/springframework/test/web/servlet/client/AbstractMockMvcServerSpec.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.client;
import jakarta.servlet.Filter;

1
spring-test/src/main/java/org/springframework/test/web/servlet/client/ApplicationContextMockMvcSpec.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.client;
import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder;

1
spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcHttpConnector.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.client;
import java.io.StringWriter;

3
spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.client;
import java.util.function.Supplier;
@ -112,7 +113,6 @@ public interface MockMvcWebTestClient { @@ -112,7 +113,6 @@ public interface MockMvcWebTestClient {
/**
* This method can be used to apply further assertions on a given
* {@link ExchangeResult} based the state of the server response.
*
* <p>Normally {@link WebTestClient} is used to assert the client response
* including HTTP status, headers, and body. That is all that is available
* when making a live request over HTTP. However when the server is
@ -134,7 +134,6 @@ public interface MockMvcWebTestClient { @@ -134,7 +134,6 @@ public interface MockMvcWebTestClient {
* .andExpect(flash().attributeCount(1))
* .andExpect(flash().attribute("message", "success!"));
* </pre>
*
* <p>Note: this method works only if the {@link WebTestClient} used to
* perform the request was initialized through one of bind method in this
* class, and therefore requests are handled by {@link MockMvc}.

1
spring-test/src/main/java/org/springframework/test/web/servlet/client/StandaloneMockMvcSpec.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.client;
import java.util.function.Supplier;

1
spring-test/src/test/java/org/springframework/test/web/client/samples/SampleTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.client.samples;
import java.io.IOException;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/ApplicationContextSpecTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import org.junit.jupiter.api.Test;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/CookieAssertionTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import java.net.URI;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/DefaultRouterFunctionSpecTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import org.junit.jupiter.api.Test;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/MockServerSpecTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import java.nio.charset.StandardCharsets;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/MockServerTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server;
import java.util.Arrays;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/ExchangeMutatorTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server.samples;
import java.security.Principal;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/GlobalEntityResultConsumerTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server.samples;
import java.nio.charset.StandardCharsets;

1
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/Person.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.reactive.server.samples;
import com.fasterxml.jackson.annotation.JsonCreator;

1
spring-test/src/test/java/org/springframework/test/web/servlet/result/HeaderResultMatchersTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.result;
import java.time.ZoneId;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/AsyncTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.client.standalone;
import java.nio.charset.StandardCharsets;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/ReactiveReturnTypeTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.client.standalone;
import java.time.Duration;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/RequestParameterTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.client.standalone;
import org.junit.jupiter.api.Test;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/SseTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.client.standalone;
import org.junit.jupiter.api.Test;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/ReactiveReturnTypeTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.standalone;
import java.time.Duration;

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/RequestParameterTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.standalone;
import org.junit.jupiter.api.Test;

4
spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -81,7 +81,7 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync @@ -81,7 +81,7 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync
if (getMethod() == HttpMethod.DELETE && bufferedOutput.length == 0) {
this.connection.setDoOutput(false);
}
if (this.connection.getDoOutput() && outputStreaming) {
if (this.connection.getDoOutput() && this.outputStreaming) {
this.connection.setFixedLengthStreamingMode(bufferedOutput.length);
}
this.connection.connect();

2
spring-web/src/main/java/org/springframework/http/client/reactive/JettyResourceFactory.java

@ -132,7 +132,7 @@ public class JettyResourceFactory implements InitializingBean, DisposableBean { @@ -132,7 +132,7 @@ public class JettyResourceFactory implements InitializingBean, DisposableBean {
if (this.byteBufferPool == null) {
this.byteBufferPool = new MappedByteBufferPool(2048,
this.executor instanceof ThreadPool.SizedThreadPool
? ((ThreadPool.SizedThreadPool) executor).getMaxThreads() / 2
? ((ThreadPool.SizedThreadPool) this.executor).getMaxThreads() / 2
: ProcessorUtils.availableProcessors() * 2);
}
if (this.scheduler == null) {

1
spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartWriterSupport.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http.codec.multipart;
import java.nio.charset.Charset;

5
spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -265,7 +265,6 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes @@ -265,7 +265,6 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes
* Parse message size as a varint from the input stream, updating {@code messageBytesToRead} and
* {@code offset} fields if needed to allow processing of upcoming chunks.
* Inspired from {@link CodedInputStream#readRawVarint32(int, java.io.InputStream)}
*
* @return {code true} when the message size is parsed successfully, {code false} when the message size is
* truncated
* @see <a href="https://developers.google.com/protocol-buffers/docs/encoding#varints">Base 128 Varints</a>
@ -290,7 +289,7 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes @@ -290,7 +289,7 @@ public class ProtobufDecoder extends ProtobufCodecSupport implements Decoder<Mes
return false;
}
final int b = input.read();
this.messageBytesToRead |= (b & 0x7f) << offset;
this.messageBytesToRead |= (b & 0x7f) << this.offset;
if ((b & 0x80) == 0) {
this.offset = 0;
return true;

1
spring-web/src/main/java/org/springframework/http/server/RequestPath.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http.server;
import java.net.URI;

1
spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponseDecorator.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http.server.reactive;
import java.util.function.Supplier;

1
spring-web/src/main/java/org/springframework/web/bind/MissingRequestValueException.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.bind;
/**

1
spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java

@ -169,7 +169,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { @@ -169,7 +169,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
* {@link HttpClientErrorException#create} for errors in the 4xx range, to
* {@link HttpServerErrorException#create} for errors in the 5xx range,
* or otherwise raises {@link UnknownHttpStatusCodeException}.
*
* @since 5.0
* @see HttpClientErrorException#create
* @see HttpServerErrorException#create

1
spring-web/src/main/java/org/springframework/web/client/RestOperations.java

@ -448,7 +448,6 @@ public interface RestOperations { @@ -448,7 +448,6 @@ public interface RestOperations {
/**
* Delete the resources at the specified URI.
* <p>URI Template variables are expanded using the given map.
*
* @param url the URL
* @param uriVariables the variables to expand the template
*/

2
spring-web/src/main/java/org/springframework/web/context/request/AsyncWebRequestInterceptor.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.context.request;
/**
@ -41,7 +42,6 @@ public interface AsyncWebRequestInterceptor extends WebRequestInterceptor{ @@ -41,7 +42,6 @@ public interface AsyncWebRequestInterceptor extends WebRequestInterceptor{
/**
* Called instead of {@code postHandle} and {@code afterCompletion}, when the
* handler started handling the request concurrently.
*
* @param request the current request
*/
void afterConcurrentHandlingStarted(WebRequest request);

1
spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java

@ -63,7 +63,6 @@ public abstract class CorsUtils { @@ -63,7 +63,6 @@ public abstract class CorsUtils {
* {@code "Forwarded"} and {@code "X-Forwarded-*"} headers that specify the
* client-originated address. Consider using the {@code ForwardedHeaderFilter}
* to extract and use, or to discard such headers.
*
* @return {@code true} if the request is a same-origin one, {@code false} in case
* of a cross-origin request
* @deprecated as of 5.2, same-origin checks are performed directly by {@link #isCorsRequest}

1
spring-web/src/main/java/org/springframework/web/cors/reactive/PreFlightRequestWebFilter.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.cors.reactive;
import reactor.core.publisher.Mono;

1
spring-web/src/main/java/org/springframework/web/filter/RelativeRedirectResponseWrapper.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.filter;
import jakarta.servlet.http.HttpServletResponse;

1
spring-web/src/main/java/org/springframework/web/filter/ServletRequestPathFilter.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.filter;
import java.io.IOException;

1
spring-web/src/main/java/org/springframework/web/server/ServerWebExchangeDecorator.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.server;
import java.security.Principal;

6
spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.util;
import java.nio.charset.StandardCharsets;
@ -53,11 +54,10 @@ public abstract class ServletRequestPathUtils { @@ -53,11 +54,10 @@ public abstract class ServletRequestPathUtils {
* {@link RequestPath} and save it in the request attribute
* {@link #PATH_ATTRIBUTE} for subsequent use with
* {@link org.springframework.web.util.pattern.PathPattern parsed patterns}.
* The returned {@code RequestPath} will have both the contextPath and any
* <p>The returned {@code RequestPath} will have both the contextPath and any
* servletPath prefix omitted from the {@link RequestPath#pathWithinApplication()
* pathWithinApplication} it exposes.
*
* <p>This method is typically called by the {@code DispatcherServlet} to
* <p>This method is typically called by the {@code DispatcherServlet} to determine
* if any {@code HandlerMapping} indicates that it uses parsed patterns.
* After that the pre-parsed and cached {@code RequestPath} can be accessed
* through {@link #getParsedRequestPath(ServletRequest)}.

1
spring-web/src/main/java/org/springframework/web/util/WebUtils.java

@ -757,7 +757,6 @@ public abstract class WebUtils { @@ -757,7 +757,6 @@ public abstract class WebUtils {
* {@code "Forwarded"} and {@code "X-Forwarded-*"} headers that specify the
* client-originated address. Consider using the {@code ForwardedHeaderFilter}
* to extract and use, or to discard such headers.
*
* @return {@code true} if the request origin is valid, {@code false} otherwise
* @since 4.1.5
* @see <a href="https://tools.ietf.org/html/rfc6454">RFC 6454: The Web Origin Concept</a>

2
spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java

@ -44,12 +44,10 @@ public class PathPatternParser { @@ -44,12 +44,10 @@ public class PathPatternParser {
/**
* Whether a {@link PathPattern} produced by this parser should
* automatically match request paths with a trailing slash.
*
* <p>If set to {@code true} a {@code PathPattern} without a trailing slash
* will also match request paths with a trailing slash. If set to
* {@code false} a {@code PathPattern} will only match request paths with
* a trailing slash.
*
* <p>The default is {@code true}.
*/
public void setMatchOptionalTrailingSeparator(boolean matchOptionalTrailingSeparator) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save