Skip to content

Commit 8680fdb

Browse files
committed
Polishing
1 parent 4fe3ca1 commit 8680fdb

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java

Lines changed: 3 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-2021 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.
@@ -71,7 +71,8 @@ public DefaultIntroductionAdvisor(Advice advice, @Nullable IntroductionInfo intr
7171
if (introductionInfo != null) {
7272
Class<?>[] introducedInterfaces = introductionInfo.getInterfaces();
7373
if (introducedInterfaces.length == 0) {
74-
throw new IllegalArgumentException("IntroductionAdviceSupport implements no interfaces");
74+
throw new IllegalArgumentException(
75+
"IntroductionInfo defines no interfaces to introduce: " + introductionInfo);
7576
}
7677
for (Class<?> ifc : introducedInterfaces) {
7778
addInterface(ifc);

spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.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-2021 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.
@@ -244,7 +244,7 @@ public String getName() {
244244
@Target({ElementType.FIELD, ElementType.PARAMETER})
245245
@Retention(RetentionPolicy.RUNTIME)
246246
@Qualifier
247-
private static @interface TestQualifier {
247+
private @interface TestQualifier {
248248
}
249249

250250
}

spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java

Lines changed: 3 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-2021 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.
@@ -47,8 +47,9 @@
4747
public class QualifierAnnotationTests {
4848

4949
private static final String CLASSNAME = QualifierAnnotationTests.class.getName();
50+
5051
private static final String CONFIG_LOCATION =
51-
format("classpath:%s-context.xml", convertClassNameToResourcePath(CLASSNAME));
52+
format("classpath:%s-context.xml", convertClassNameToResourcePath(CLASSNAME));
5253

5354

5455
@Test

spring-oxm/spring-oxm.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies {
4343
}
4444

4545
// JiBX compiler is currently not compatible with JDK 9+.
46-
// If customJavaHome has been set, we assume the custom JDK version is 9+.
46+
// If testToolchain has been set, we assume the custom JDK version is 9+.
4747
if ((JavaVersion.current() == JavaVersion.VERSION_1_8) && !project.hasProperty("testToolchain")) {
4848
compileTestJava {
4949
def bindingXml = "${projectDir}/src/test/resources/org/springframework/oxm/jibx/binding.xml"

spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
5050

5151
private static final Pattern SAMESITE_PATTERN = Pattern.compile("(?i).*SameSite=(Strict|Lax|None).*");
5252

53-
private static final ClassLoader loader = JettyClientHttpResponse.class.getClassLoader();
53+
private static final ClassLoader classLoader = JettyClientHttpResponse.class.getClassLoader();
5454

5555
private static final boolean jetty10Present;
5656

@@ -64,7 +64,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
6464

6565
static {
6666
try {
67-
Class<?> httpFieldsClass = loader.loadClass("org.eclipse.jetty.http.HttpFields");
67+
Class<?> httpFieldsClass = classLoader.loadClass("org.eclipse.jetty.http.HttpFields");
6868
jetty10Present = httpFieldsClass.isInterface();
6969
}
7070
catch (ClassNotFoundException ex) {
@@ -144,7 +144,7 @@ private static class Jetty10HttpFieldsHelper {
144144
static {
145145
try {
146146
getHeadersMethod = Response.class.getMethod("getHeaders");
147-
Class<?> type = loader.loadClass("org.eclipse.jetty.http.HttpField");
147+
Class<?> type = classLoader.loadClass("org.eclipse.jetty.http.HttpField");
148148
getNameMethod = type.getMethod("getName");
149149
getValueMethod = type.getMethod("getValue");
150150
}

spring-web/src/main/java/org/springframework/http/client/reactive/JettyHeadersAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public String toString() {
187187

188188
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
189189

190-
private Enumeration<String> names = headers.getFieldNames();
190+
private final Enumeration<String> names = headers.getFieldNames();
191191

192192
@Override
193193
public boolean hasNext() {
@@ -241,6 +241,7 @@ public int size() {
241241
}
242242
}
243243

244+
244245
private final class HeaderNamesIterator implements Iterator<String> {
245246

246247
private final Iterator<String> iterator;

spring-web/src/main/java/org/springframework/http/server/reactive/JettyHeadersAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public String toString() {
187187

188188
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
189189

190-
private Enumeration<String> names = headers.getFieldNames();
190+
private final Enumeration<String> names = headers.getFieldNames();
191191

192192
@Override
193193
public boolean hasNext() {
@@ -241,6 +241,7 @@ public int size() {
241241
}
242242
}
243243

244+
244245
private final class HeaderNamesIterator implements Iterator<String> {
245246

246247
private final Iterator<String> iterator;

0 commit comments

Comments
 (0)