Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit707eb70

Browse files
committed
Polishing
1 parent2c97996 commit707eb70

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

‎spring-context/src/main/java/org/springframework/context/annotation/ImportRuntimeHints.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-2023 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.
@@ -44,7 +44,6 @@
4444
* public MyService myService() {
4545
* return new MyService();
4646
* }
47-
*
4847
* }</pre>
4948
*
5049
* <p>If the configuration class above is processed, {@code MyHints} will be

‎spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,8 @@ public Object invoke(MethodInvocation mi) throws Throwable {
10861086
// NameReverter saved it back
10871087
assertThat(it.getName()).isEqualTo(name1);
10881088
assertThat(saver.names).hasSize(2);
1089-
assertThat(saver.names.get(0)).isEqualTo(name2);
1090-
assertThat(saver.names.get(1)).isEqualTo(name1);
1089+
assertThat(saver.names).element(0).isEqualTo(name2);
1090+
assertThat(saver.names).element(1).isEqualTo(name1);
10911091
}
10921092

10931093
@SuppressWarnings("serial")
@@ -1178,7 +1178,7 @@ public void testEquals() {
11781178
assertThat(i2).isEqualTo(i1);
11791179
assertThat(proxyB).isEqualTo(proxyA);
11801180
assertThat(proxyB.hashCode()).isEqualTo(proxyA.hashCode());
1181-
assertThat(proxyA.equals(a)).isFalse();
1181+
assertThat(proxyA).isNotEqualTo(a);
11821182

11831183
// Equality checks were handled by the proxy
11841184
assertThat(i1.getCount()).isEqualTo(0);
@@ -1187,7 +1187,7 @@ public void testEquals() {
11871187
// and won't think it's equal to B's NopInterceptor
11881188
proxyA.absquatulate();
11891189
assertThat(i1.getCount()).isEqualTo(1);
1190-
assertThat(proxyA.equals(proxyB)).isFalse();
1190+
assertThat(proxyA).isNotEqualTo(proxyB);
11911191
}
11921192

11931193
@Test
@@ -1874,6 +1874,14 @@ public Class<?> getTargetClass() {
18741874
returntarget.getClass();
18751875
}
18761876

1877+
/**
1878+
* @see org.springframework.aop.TargetSource#isStatic()
1879+
*/
1880+
@Override
1881+
publicbooleanisStatic() {
1882+
returnfalse;
1883+
}
1884+
18771885
/**
18781886
* @see org.springframework.aop.TargetSource#getTarget()
18791887
*/
@@ -1903,19 +1911,10 @@ public void verify() {
19031911
thrownewRuntimeException("Expectation failed: " +gets +" gets and " +releases +" releases");
19041912
}
19051913
}
1906-
1907-
/**
1908-
* @see org.springframework.aop.TargetSource#isStatic()
1909-
*/
1910-
@Override
1911-
publicbooleanisStatic() {
1912-
returnfalse;
1913-
}
1914-
19151914
}
19161915

19171916

1918-
staticabstractclassExposedInvocationTestBeanextendsTestBean {
1917+
abstractstaticclassExposedInvocationTestBeanextendsTestBean {
19191918

19201919
@Override
19211920
publicStringgetName() {

‎spring-context/src/test/java/org/springframework/context/support/GenericApplicationContextTests.java‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@ void accessAfterClosing() {
126126

127127
assertThat(context.getBean(String.class)).isSameAs(context.getBean("testBean"));
128128
assertThat(context.getAutowireCapableBeanFactory().getBean(String.class))
129-
.isSameAs(context.getAutowireCapableBeanFactory().getBean("testBean"));
129+
.isSameAs(context.getAutowireCapableBeanFactory().getBean("testBean"));
130130

131131
context.close();
132132

133133
assertThatIllegalStateException()
134-
.isThrownBy(() ->context.getBean(String.class));
134+
.isThrownBy(() ->context.getBean(String.class));
135135
assertThatIllegalStateException()
136-
.isThrownBy(() ->context.getAutowireCapableBeanFactory().getBean(String.class));
136+
.isThrownBy(() ->context.getAutowireCapableBeanFactory().getBean(String.class));
137137
assertThatIllegalStateException()
138-
.isThrownBy(() ->context.getAutowireCapableBeanFactory().getBean("testBean"));
138+
.isThrownBy(() ->context.getAutowireCapableBeanFactory().getBean("testBean"));
139139
}
140140

141141
@Test
@@ -236,9 +236,9 @@ void individualBeanWithNullReturningSupplier() {
236236
assertThat(context.getBeanNamesForType(BeanB.class)).containsExactly("b");
237237
assertThat(context.getBeanNamesForType(BeanC.class)).containsExactly("c");
238238
assertThat(context.getBeansOfType(BeanA.class)).isEmpty();
239-
assertThat(context.getBeansOfType(BeanB.class).values().iterator().next())
239+
assertThat(context.getBeansOfType(BeanB.class).values()).element(0)
240240
.isSameAs(context.getBean(BeanB.class));
241-
assertThat(context.getBeansOfType(BeanC.class).values().iterator().next())
241+
assertThat(context.getBeansOfType(BeanC.class).values()).element(0)
242242
.isSameAs(context.getBean(BeanC.class));
243243
}
244244

@@ -281,8 +281,8 @@ private void assertGetResourceSemantics(ResourceLoader resourceLoader, Class<? e
281281
// java.nio.file.InvalidPathException: Illegal char <:> at index 4: ping:foo
282282
if (resourceLoaderinstanceofFileSystemResourceLoader &&OS.WINDOWS.isCurrentOs()) {
283283
assertThatExceptionOfType(InvalidPathException.class)
284-
.isThrownBy(() ->context.getResource(pingLocation))
285-
.withMessageContaining(pingLocation);
284+
.isThrownBy(() ->context.getResource(pingLocation))
285+
.withMessageContaining(pingLocation);
286286
}
287287
else {
288288
resource =context.getResource(pingLocation);
@@ -297,8 +297,8 @@ private void assertGetResourceSemantics(ResourceLoader resourceLoader, Class<? e
297297
assertThat(resource).isInstanceOf(FileUrlResource.class);
298298
resource =context.getResource(pingLocation);
299299
assertThat(resource).asInstanceOf(type(ByteArrayResource.class))
300-
.extracting(bar ->newString(bar.getByteArray(),UTF_8))
301-
.isEqualTo("pong:foo");
300+
.extracting(bar ->newString(bar.getByteArray(),UTF_8))
301+
.isEqualTo("pong:foo");
302302
}
303303

304304
@Test
@@ -536,7 +536,7 @@ public BeanA(BeanB b, BeanC c) {
536536
}
537537
}
538538

539-
staticclassBeanBimplementsApplicationContextAware{
539+
staticclassBeanBimplementsApplicationContextAware {
540540

541541
ApplicationContextapplicationContext;
542542

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp