Merge branch '5.3.x'
This commit is contained in:
commit
16bf39ea1b
|
@ -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 ->
|
|||
// 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 = [
|
||||
|
|
|
@ -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
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getName() + ": class = " + this.clazz.getName() + "; methodName = " + methodName;
|
||||
return getClass().getName() + ": class = " + this.clazz.getName() + "; methodName = " + this.methodName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
|||
* @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 {
|
|||
String className = ClassUtils.getShortName(proxy.getClass());
|
||||
assertThat(className).as("Class name did not match").isEqualTo("TestBean");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 @@
|
|||
* 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 {
|
||||
|
||||
}
|
||||
|
|
|
@ -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 {
|
|||
|
||||
@Transactional
|
||||
private void doInTransaction() {}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 {
|
|||
|
||||
@Transactional
|
||||
protected void doInTransaction() {}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 @@
|
|||
* 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 {
|
|||
public TestBean getSpouse() {
|
||||
return spouse;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.core.codec;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
|||
* 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 {
|
||||
* @Override
|
||||
|
@ -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 {
|
||||
* @Override
|
||||
|
@ -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*},
|
||||
* <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 {
|
|||
* 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
|
||||
|
|
|
@ -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 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.core.io.buffer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.core.io.buffer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -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 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
||||
|
|
|
@ -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 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.util.concurrent;
|
||||
|
||||
import java.time.Duration;
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
|||
* @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 {
|
|||
}
|
||||
|
||||
@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 {
|
|||
}
|
||||
|
||||
@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 {
|
|||
}
|
||||
|
||||
@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 {
|
|||
}
|
||||
|
||||
@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();
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
|||
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 {
|
|||
|
||||
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"))
|
||||
|
|
|
@ -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 @@
|
|||
* 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 {
|
|||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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> {
|
|||
* 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
|
||||
|
|
|
@ -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 @@
|
|||
* 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;
|
|||
* @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 {
|
|||
}
|
||||
|
||||
@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() {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|||
* @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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.messaging.simp.user;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
|||
this.encodedContent = Flux.empty();
|
||||
return Mono.empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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).
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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 {
|
|||
/**
|
||||
* 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 {
|
|||
/**
|
||||
* 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 {
|
|||
* {@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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
|||
* jsonPath("$.person.name").value("Jason")
|
||||
* );
|
||||
* </pre>
|
||||
*
|
||||
* @since 5.3.10
|
||||
* @see #andExpect(ResultMatcher)
|
||||
*/
|
||||
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
|||
/**
|
||||
* 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 {
|
|||
* .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}.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
|||
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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
|||
* 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
|
|||
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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.bind;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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{
|
|||
/**
|
||||
* 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);
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
|||
* {@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)}.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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…
Reference in New Issue