Browse Source

Merge pull request #31930 from izeye

* pr/31930:
  Update copyright year of changed files
  Polish

Closes gh-31930
pull/31932/head
Stéphane Nicoll 2 years ago
parent
commit
9a1ee48d73
  1. 4
      spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java
  2. 4
      spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGenerator.java
  3. 6
      spring-beans/src/test/java/org/springframework/beans/factory/support/SimpleInstantiationStrategyTests.java
  4. 10
      spring-context/src/test/java/org/springframework/jmx/export/naming/MetadataNamingStrategyTests.java
  5. 4
      spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -52,7 +52,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher @@ -52,7 +52,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
/**
* The class against which to match.
* <p>Available for use in subclasses since 6.1.
* @since 6.1
*/
protected final Class<?> clazz;

4
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGenerator.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -367,7 +367,7 @@ class BeanDefinitionPropertiesCodeGenerator { @@ -367,7 +367,7 @@ class BeanDefinitionPropertiesCodeGenerator {
* @param castNecessary whether a cast is necessary
* @param castType the type to cast to
* @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
*/
private CodeBlock castIfNecessary(boolean castNecessary, Class<?> castType, CodeBlock valueCode) {

6
spring-beans/src/test/java/org/springframework/beans/factory/support/SimpleInstantiationStrategyTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -46,7 +46,7 @@ class SimpleInstantiationStrategyTests { @@ -46,7 +46,7 @@ class SimpleInstantiationStrategyTests {
}
@Test
void instantiateWitArgs() {
void instantiateWithArgs() {
RootBeanDefinition bd = new RootBeanDefinition(String.class);
Object simpleBean = instantiate(bd, new SampleFactory(),
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);
@ -54,7 +54,7 @@ class SimpleInstantiationStrategyTests { @@ -54,7 +54,7 @@ class SimpleInstantiationStrategyTests {
}
@Test
void instantiateWitSubClassFactoryArgs() {
void instantiateWithSubClassFactoryArgs() {
RootBeanDefinition bd = new RootBeanDefinition(String.class);
Object simpleBean = instantiate(bd, new ExtendedSampleFactory(),
method(SampleFactory.class, "beanWithTwoArgs"), "Test", 42);

10
spring-context/src/test/java/org/springframework/jmx/export/naming/MetadataNamingStrategyTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -62,25 +62,25 @@ class MetadataNamingStrategyTests { @@ -62,25 +62,25 @@ class MetadataNamingStrategyTests {
}
@Test
void getObjectNameWhenBeanNamContainsComma() throws MalformedObjectNameException {
void getObjectNameWhenBeanNameContainsComma() throws MalformedObjectNameException {
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "myBean,");
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"myBean,\""));
}
@Test
void getObjectNameWhenBeanNamContainsEquals() throws MalformedObjectNameException {
void getObjectNameWhenBeanNameContainsEquals() throws MalformedObjectNameException {
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my=Bean");
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my=Bean\""));
}
@Test
void getObjectNameWhenBeanNamContainsColon() throws MalformedObjectNameException {
void getObjectNameWhenBeanNameContainsColon() throws MalformedObjectNameException {
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "my:Bean");
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"my:Bean\""));
}
@Test
void getObjectNameWhenBeanNamContainsQuote() throws MalformedObjectNameException {
void getObjectNameWhenBeanNameContainsQuote() throws MalformedObjectNameException {
ObjectName name = this.strategy.getObjectName(TEST_BEAN, "\"myBean\"");
assertThat(name).satisfies(hasDefaultProperties(TEST_BEAN, "\"\\\"myBean\\\"\""));
}

4
spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -56,7 +56,7 @@ import org.springframework.util.FastByteArrayOutputStream; @@ -56,7 +56,7 @@ import org.springframework.util.FastByteArrayOutputStream;
*/
public class ContentCachingRequestWrapper extends HttpServletRequestWrapper {
private FastByteArrayOutputStream cachedContent;
private final FastByteArrayOutputStream cachedContent;
@Nullable
private final Integer contentCacheLimit;

Loading…
Cancel
Save