Skip to content

Commit 0c42965

Browse files
committed
Polish
1 parent e1236a8 commit 0c42965

71 files changed

Lines changed: 543 additions & 828 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

framework-docs/src/main/java/org/springframework/docs/core/aot/hints/testing/SpellCheckServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
2424

2525
import static org.assertj.core.api.Assertions.assertThat;
2626

27-
public class SpellCheckServiceTests {
27+
class SpellCheckServiceTests {
2828

2929
// tag::hintspredicates[]
3030
@Test

integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ void testSingletonScoping() throws Exception {
7575
}
7676

7777
@Test
78-
void testRequestScoping() throws Exception {
78+
void testRequestScoping() {
7979
MockHttpServletRequest oldRequest = new MockHttpServletRequest();
8080
MockHttpServletRequest newRequest = new MockHttpServletRequest();
8181

@@ -103,7 +103,7 @@ void testRequestScoping() throws Exception {
103103
}
104104

105105
@Test
106-
void testSessionScoping() throws Exception {
106+
void testSessionScoping() {
107107
MockHttpSession oldSession = new MockHttpSession();
108108
MockHttpSession newSession = new MockHttpSession();
109109

integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.aop.framework.autoproxy;
1818

19-
import java.io.IOException;
2019
import java.lang.reflect.Method;
2120
import java.util.List;
2221

@@ -61,12 +60,12 @@ class AdvisorAutoProxyCreatorIntegrationTests {
6160
/**
6261
* Return a bean factory with attributes and EnterpriseServices configured.
6362
*/
64-
protected BeanFactory getBeanFactory() throws IOException {
63+
protected BeanFactory getBeanFactory() {
6564
return new ClassPathXmlApplicationContext(DEFAULT_CONTEXT, CLASS);
6665
}
6766

6867
@Test
69-
void testDefaultExclusionPrefix() throws Exception {
68+
void testDefaultExclusionPrefix() {
7069
DefaultAdvisorAutoProxyCreator aapc = (DefaultAdvisorAutoProxyCreator) getBeanFactory().getBean(ADVISOR_APC_BEAN_NAME);
7170
assertThat(aapc.getAdvisorBeanNamePrefix()).isEqualTo((ADVISOR_APC_BEAN_NAME + DefaultAdvisorAutoProxyCreator.SEPARATOR));
7271
assertThat(aapc.isUsePrefix()).isFalse();
@@ -76,21 +75,21 @@ void testDefaultExclusionPrefix() throws Exception {
7675
* If no pointcuts match (no attrs) there should be proxying.
7776
*/
7877
@Test
79-
void testNoProxy() throws Exception {
78+
void testNoProxy() {
8079
BeanFactory bf = getBeanFactory();
8180
Object o = bf.getBean("noSetters");
8281
assertThat(AopUtils.isAopProxy(o)).isFalse();
8382
}
8483

8584
@Test
86-
void testTxIsProxied() throws Exception {
85+
void testTxIsProxied() {
8786
BeanFactory bf = getBeanFactory();
8887
ITestBean test = (ITestBean) bf.getBean("test");
8988
assertThat(AopUtils.isAopProxy(test)).isTrue();
9089
}
9190

9291
@Test
93-
void testRegexpApplied() throws Exception {
92+
void testRegexpApplied() {
9493
BeanFactory bf = getBeanFactory();
9594
ITestBean test = (ITestBean) bf.getBean("test");
9695
MethodCounter counter = (MethodCounter) bf.getBean("countingAdvice");
@@ -100,7 +99,7 @@ void testRegexpApplied() throws Exception {
10099
}
101100

102101
@Test
103-
void testTransactionAttributeOnMethod() throws Exception {
102+
void testTransactionAttributeOnMethod() {
104103
BeanFactory bf = getBeanFactory();
105104
ITestBean test = (ITestBean) bf.getBean("test");
106105

@@ -166,7 +165,7 @@ void testRollbackRulesOnMethodPreventRollback() throws Exception {
166165
}
167166

168167
@Test
169-
void testProgrammaticRollback() throws Exception {
168+
void testProgrammaticRollback() {
170169
BeanFactory bf = getBeanFactory();
171170

172171
Object bean = bf.getBean(TXMANAGER_BEAN_NAME);
@@ -250,7 +249,7 @@ public CountingBeforeAdvice getCountingBeforeAdvice() {
250249
}
251250

252251
@Override
253-
public void afterPropertiesSet() throws Exception {
252+
public void afterPropertiesSet() {
254253
setAdvice(new TxCountingBeforeAdvice());
255254
}
256255

integration-tests/src/test/java/org/springframework/aot/RuntimeHintsAgentTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@
4646
* @author Brian Clozel
4747
*/
4848
@EnabledIfRuntimeHintsAgent
49-
public class RuntimeHintsAgentTests {
49+
class RuntimeHintsAgentTests {
5050

5151
private static final ClassLoader classLoader = ClassLoader.getSystemClassLoader();
5252

@@ -58,7 +58,7 @@ public class RuntimeHintsAgentTests {
5858

5959

6060
@BeforeAll
61-
public static void classSetup() throws NoSuchMethodException {
61+
static void classSetup() throws NoSuchMethodException {
6262
defaultConstructor = String.class.getConstructor();
6363
toStringMethod = String.class.getMethod("toString");
6464
privateGreetMethod = PrivateClass.class.getDeclaredMethod("greet");

integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentBeanDefinitionParserTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ class ComponentBeanDefinitionParserTests {
3939

4040

4141
@BeforeAll
42-
void setUp() throws Exception {
42+
void setUp() {
4343
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(
4444
new ClassPathResource("component-config.xml", ComponentBeanDefinitionParserTests.class));
4545
}

integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public void setChildren(List<Component> children) {
3434
}
3535

3636
@Override
37-
public Component getObject() throws Exception {
37+
public Component getObject() {
3838
if (this.children != null && this.children.size() > 0) {
3939
for (Component child : children) {
4040
this.parent.addComponent(child);

integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,6 @@
4242
* @author Chris Beams
4343
* @since 3.1
4444
*/
45-
@SuppressWarnings("resource")
4645
class EnableCachingIntegrationTests {
4746

4847
@Test

integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -87,7 +87,6 @@
8787
* @author Sam Brannen
8888
* @see org.springframework.context.support.EnvironmentIntegrationTests
8989
*/
90-
@SuppressWarnings("resource")
9190
public class EnvironmentSystemIntegrationTests {
9291

9392
private final ConfigurableEnvironment prodEnv = new StandardEnvironment();
@@ -618,7 +617,7 @@ public void setEnvironment(Environment environment) {
618617
@Import({DevConfig.class, ProdConfig.class})
619618
static class Config {
620619
@Bean
621-
public EnvironmentAwareBean envAwareBean() {
620+
EnvironmentAwareBean envAwareBean() {
622621
return new EnvironmentAwareBean();
623622
}
624623
}

integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,6 @@
5151
* @author Juergen Hoeller
5252
* @since 3.1
5353
*/
54-
@SuppressWarnings("resource")
5554
@EnabledForTestGroups(LONG_RUNNING)
5655
class ScheduledAndTransactionalAnnotationIntegrationTests {
5756

integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,7 +54,6 @@
5454
* @author Sam Brannen
5555
* @since 3.1
5656
*/
57-
@SuppressWarnings("resource")
5857
class EnableTransactionManagementIntegrationTests {
5958

6059
@Test

0 commit comments

Comments
 (0)