Polish
See gh-31930
This commit is contained in:
committed by
Stéphane Nicoll
parent
fdb454b9a4
commit
ff8097d37c
@@ -52,7 +52,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The class against which to match.
|
* The class against which to match.
|
||||||
* <p>Available for use in subclasses since 6.1.
|
* @since 6.1
|
||||||
*/
|
*/
|
||||||
protected final Class<?> clazz;
|
protected final Class<?> clazz;
|
||||||
|
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ class BeanDefinitionPropertiesCodeGenerator {
|
|||||||
* @param castNecessary whether a cast is necessary
|
* @param castNecessary whether a cast is necessary
|
||||||
* @param castType the type to cast to
|
* @param castType the type to cast to
|
||||||
* @param valueCode the code for the value
|
* @param valueCode the code for the value
|
||||||
* @return the existing value or a form of {@code (CastType) valueCode} if a
|
* @return the existing value or a form of {@code (castType) valueCode} if a
|
||||||
* cast is necessary
|
* cast is necessary
|
||||||
*/
|
*/
|
||||||
private CodeBlock castIfNecessary(boolean castNecessary, Class<?> castType, CodeBlock valueCode) {
|
private CodeBlock castIfNecessary(boolean castNecessary, Class<?> castType, CodeBlock valueCode) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class SimpleInstantiationStrategyTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void instantiateWitArgs() {
|
void instantiateWithArgs() {
|
||||||
RootBeanDefinition bd = new RootBeanDefinition(String.class);
|
RootBeanDefinition bd = new RootBeanDefinition(String.class);
|
||||||
Object simpleBean = instantiate(bd, new SampleFactory(),
|
Object simpleBean = instantiate(bd, new SampleFactory(),
|
||||||
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);
|
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);
|
||||||
@@ -54,7 +54,7 @@ class SimpleInstantiationStrategyTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void instantiateWitSubClassFactoryArgs() {
|
void instantiateWithSubClassFactoryArgs() {
|
||||||
RootBeanDefinition bd = new RootBeanDefinition(String.class);
|
RootBeanDefinition bd = new RootBeanDefinition(String.class);
|
||||||
Object simpleBean = instantiate(bd, new ExtendedSampleFactory(),
|
Object simpleBean = instantiate(bd, new ExtendedSampleFactory(),
|
||||||
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);
|
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);
|
||||||
|
|||||||
@@ -62,25 +62,25 @@ class MetadataNamingStrategyTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getObjectNameWhenBeanNamContainsComma() throws MalformedObjectNameException {
|
void getObjectNameWhenBeanNameContainsComma() throws MalformedObjectNameException {
|
||||||
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "myBean,");
|
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "myBean,");
|
||||||
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"myBean,\""));
|
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"myBean,\""));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getObjectNameWhenBeanNamContainsEquals() throws MalformedObjectNameException {
|
void getObjectNameWhenBeanNameContainsEquals() throws MalformedObjectNameException {
|
||||||
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my=Bean");
|
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my=Bean");
|
||||||
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my=Bean\""));
|
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my=Bean\""));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getObjectNameWhenBeanNamContainsColon() throws MalformedObjectNameException {
|
void getObjectNameWhenBeanNameContainsColon() throws MalformedObjectNameException {
|
||||||
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my:Bean");
|
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my:Bean");
|
||||||
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my:Bean\""));
|
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my:Bean\""));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getObjectNameWhenBeanNamContainsQuote() throws MalformedObjectNameException {
|
void getObjectNameWhenBeanNameContainsQuote() throws MalformedObjectNameException {
|
||||||
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "\"myBean\"");
|
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "\"myBean\"");
|
||||||
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"\\\"myBean\\\"\""));
|
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"\\\"myBean\\\"\""));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ import org.springframework.util.FastByteArrayOutputStream;
|
|||||||
*/
|
*/
|
||||||
public class ContentCachingRequestWrapper extends HttpServletRequestWrapper {
|
public class ContentCachingRequestWrapper extends HttpServletRequestWrapper {
|
||||||
|
|
||||||
private FastByteArrayOutputStream cachedContent;
|
private final FastByteArrayOutputStream cachedContent;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Integer contentCacheLimit;
|
private final Integer contentCacheLimit;
|
||||||
|
|||||||
Reference in New Issue
Block a user