Fix and improve Javadoc in spring-context
Closes gh-28802
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user