Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations. Closes gh-31469
This commit is contained in:
@@ -39,7 +39,7 @@ class SPR3064Tests {
|
||||
ClassPathXmlApplicationContext ctx =
|
||||
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||
|
||||
Service service = ctx.getBean(Service.class);
|
||||
Service service = ctx.getBean(Service.class);
|
||||
assertThatRuntimeException()
|
||||
.isThrownBy(service::serveMe)
|
||||
.withMessage("advice invoked");
|
||||
|
||||
@@ -166,7 +166,7 @@ class BeanNameAutoProxyCreatorTests {
|
||||
}
|
||||
|
||||
|
||||
private void jdkAssertions(ITestBean tb, int nopInterceptorCount) {
|
||||
private void jdkAssertions(ITestBean tb, int nopInterceptorCount) {
|
||||
NopInterceptor nop = (NopInterceptor) beanFactory.getBean("nopInterceptor");
|
||||
assertThat(nop.getCount()).isEqualTo(0);
|
||||
assertThat(AopUtils.isJdkDynamicProxy(tb)).isTrue();
|
||||
|
||||
@@ -418,7 +418,7 @@ abstract class OverrideOneMethod extends MethodReplaceCandidate implements Overr
|
||||
|
||||
@Override
|
||||
public String replaceMe(String someParam) {
|
||||
return "replaceMe:" + someParam;
|
||||
return "replaceMe:" + someParam;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ExpressionEvaluatorTests {
|
||||
EvaluationContext context = createEvaluationContext(CacheOperationExpressionEvaluator.RESULT_UNAVAILABLE);
|
||||
assertThatExceptionOfType(VariableNotAvailableException.class).isThrownBy(() ->
|
||||
new SpelExpressionParser().parseExpression("#result").getValue(context))
|
||||
.satisfies(ex -> assertThat(ex.getName()).isEqualTo("result"));
|
||||
.satisfies(ex -> assertThat(ex.getName()).isEqualTo("result"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -122,7 +122,7 @@ public class Spr10744Tests {
|
||||
static class MyTestConfiguration extends MyConfiguration {
|
||||
|
||||
@Bean
|
||||
@Scope(value = "myTestScope", proxyMode = ScopedProxyMode.TARGET_CLASS)
|
||||
@Scope(value = "myTestScope", proxyMode = ScopedProxyMode.TARGET_CLASS)
|
||||
@Override
|
||||
public Foo foo() {
|
||||
return new Foo();
|
||||
|
||||
@@ -69,7 +69,7 @@ class Spr12334Tests {
|
||||
private static AtomicInteger scanned = new AtomicInteger();
|
||||
|
||||
@Override
|
||||
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {
|
||||
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {
|
||||
if (scanned.get() > 0) {
|
||||
throw new IllegalStateException("Already scanned");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class FactoryMethodComponent {
|
||||
|
||||
private int i;
|
||||
|
||||
public static TestBean nullInstance() {
|
||||
public static TestBean nullInstance() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@ class DefaultLifecycleProcessorTests {
|
||||
return new TestLifecycleBean(null, stoppedBeans);
|
||||
}
|
||||
|
||||
private TestLifecycleBean(CopyOnWriteArrayList<Lifecycle> startedBeans, CopyOnWriteArrayList<Lifecycle> stoppedBeans) {
|
||||
private TestLifecycleBean(CopyOnWriteArrayList<Lifecycle> startedBeans, CopyOnWriteArrayList<Lifecycle> stoppedBeans) {
|
||||
this.startedBeans = startedBeans;
|
||||
this.stoppedBeans = stoppedBeans;
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ class GenericApplicationContextTests {
|
||||
}
|
||||
}
|
||||
|
||||
static class BeanB implements ApplicationContextAware {
|
||||
static class BeanB implements ApplicationContextAware {
|
||||
|
||||
ApplicationContext applicationContext;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class JmxUtilsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void isMBeanWithDynamicMBean() {
|
||||
void isMBeanWithDynamicMBean() {
|
||||
DynamicMBean mbean = new TestDynamicMBean();
|
||||
assertThat(JmxUtils.isMBean(mbean.getClass())).as("Dynamic MBean not detected correctly").isTrue();
|
||||
}
|
||||
@@ -76,24 +76,24 @@ class JmxUtilsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void notAnMBean() {
|
||||
void notAnMBean() {
|
||||
assertThat(JmxUtils.isMBean(Object.class)).as("Object incorrectly identified as an MBean").isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void simpleMBean() {
|
||||
void simpleMBean() {
|
||||
Foo foo = new Foo();
|
||||
assertThat(JmxUtils.isMBean(foo.getClass())).as("Simple MBean not detected correctly").isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void simpleMXBean() {
|
||||
void simpleMXBean() {
|
||||
FooX foo = new FooX();
|
||||
assertThat(JmxUtils.isMBean(foo.getClass())).as("Simple MXBean not detected correctly").isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void simpleMBeanThroughInheritance() {
|
||||
void simpleMBeanThroughInheritance() {
|
||||
Bar bar = new Bar();
|
||||
Abc abc = new Abc();
|
||||
assertThat(JmxUtils.isMBean(bar.getClass())).as("Simple MBean (through inheritance) not detected correctly").isTrue();
|
||||
|
||||
@@ -1357,7 +1357,7 @@ class CronExpressionTests {
|
||||
@Test
|
||||
public void various() {
|
||||
CronExpression cronExpression = CronExpression.parse("3-57 13-28 17,18 1,15 3-12 6#1");
|
||||
LocalDateTime last = LocalDateTime.of(2022, 9, 15, 17, 44, 11);
|
||||
LocalDateTime last = LocalDateTime.of(2022, 9, 15, 17, 44, 11);
|
||||
LocalDateTime expected = LocalDateTime.of(2022, 10, 1, 17, 13, 3);
|
||||
LocalDateTime actual = cronExpression.next(last);
|
||||
assertThat(actual).isNotNull();
|
||||
|
||||
Reference in New Issue
Block a user