Fix and improve Javadoc in spring-context

Closes gh-28802
This commit is contained in:
Marc Wrobel
2022-07-12 16:43:15 +02:00
committed by Sam Brannen
parent bc15f839cd
commit c48c5e7691
50 changed files with 82 additions and 81 deletions

View File

@@ -510,7 +510,7 @@ public class ProxyFactoryBeanTests {
agi = (AddedGlobalInterface) l;
assertThat(agi.globalsAdded() == -1).isTrue();
assertThat(factory.getBean("test1")).as("Aspect interface should't be implemeneted without globals")
assertThat(factory.getBean("test1")).as("Aspect interface shouldn't be implemented without globals")
.isNotInstanceOf(AddedGlobalInterface.class);
}
@@ -588,7 +588,7 @@ public class ProxyFactoryBeanTests {
assertThatExceptionOfType(LockedException.class).isThrownBy(() -> bean1.setAge(5));
bean2.setAge(6); //do not expect LockedException"
bean2.setAge(6); //do not expect LockedException
}
@Test

View File

@@ -153,7 +153,7 @@ class CommonsPool2TargetSourceTests {
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
targetSource::getTarget);
// lets now release an object and try to acquire a new one
// let's now release an object and try to acquire a new one
targetSource.releaseTarget(pooledInstances[9]);
pooledInstances[9] = targetSource.getTarget();
@@ -181,7 +181,7 @@ class CommonsPool2TargetSourceTests {
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(
targetSource::getTarget);
// lets now release an object and try to acquire a new one
// let's now release an object and try to acquire a new one
targetSource.releaseTarget(pooledInstances[9]);
pooledInstances[9] = targetSource.getTarget();

View File

@@ -135,7 +135,7 @@ public class CachePutEvaluationTests {
}
/**
* Represent an invalid use case. If the result of the operation is non null, then we put
* Represent an invalid use case. If the result of the operation is non-null, then we put
* the value with a different key. This forces the method to be executed every time.
*/
@Cacheable

View File

@@ -98,7 +98,7 @@ public class ParserStrategyUtilsTests {
@Test
public void instantiateClassWhenHasMultipleConstructorsUsesNoArgsConstructor() {
// Remain back-compatible by using the default constructor if there's more then one
// Remain back-compatible by using the default constructor if there's more than one
MultipleConstructors instance = instantiateClass(MultipleConstructors.class);
assertThat(instance.usedDefaultConstructor).isTrue();
}

View File

@@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests changes introduced for SPR-8874, allowing beans of primitive types to be looked
* up via getBean(Class), or to be injected using @Autowired or @Injected or @Resource.
* Prior to these changes, an attempt to lookup or inject a bean of type boolean would
* Prior to these changes, an attempt to look up or inject a bean of type boolean would
* fail because all spring beans are Objects, regardless of initial type due to the way
* that ObjectFactory works.
*

View File

@@ -125,7 +125,7 @@ public class GenericApplicationListenerAdapterTests extends AbstractApplicationE
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
}
@Test // Demonstrates we cant inject that event because the listener has a wildcard
@Test // Demonstrates we cannot inject that event because the listener has a wildcard
public void genericListenerWildcardTypeTypeErasure() {
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());
@@ -138,7 +138,7 @@ public class GenericApplicationListenerAdapterTests extends AbstractApplicationE
ResolvableType.forClassWithGenerics(GenericTestEvent.class, String.class));
}
@Test // Demonstrates we cant inject that event because the listener has a raw type
@Test // Demonstrates we cannot inject that event because the listener has a raw type
public void genericListenerRawTypeTypeErasure() {
GenericTestEvent<String> stringEvent = createGenericTestEvent("test");
ResolvableType eventType = ResolvableType.forType(stringEvent.getClass());