Browse Source

Polishing

pull/27151/head
Juergen Hoeller 5 years ago
parent
commit
8680fdb8bc
  1. 5
      spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
  2. 4
      spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java
  3. 5
      spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java
  4. 2
      spring-oxm/spring-oxm.gradle
  5. 6
      spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java
  6. 3
      spring-web/src/main/java/org/springframework/http/client/reactive/JettyHeadersAdapter.java
  7. 3
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyHeadersAdapter.java

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -71,7 +71,8 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil @@ -71,7 +71,8 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
if (introductionInfo != null) {
Class<?>[] introducedInterfaces = introductionInfo.getInterfaces();
if (introducedInterfaces.length == 0) {
throw new IllegalArgumentException("IntroductionAdviceSupport implements no interfaces");
throw new IllegalArgumentException(
"IntroductionInfo defines no interfaces to introduce: " + introductionInfo);
}
for (Class<?> ifc : introducedInterfaces) {
addInterface(ifc);

4
spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -244,7 +244,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @@ -244,7 +244,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests {
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Qualifier
private static @interface TestQualifier {
private @interface TestQualifier {
}
}

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -47,8 +47,9 @@ import static org.springframework.util.ClassUtils.convertClassNameToResourcePath @@ -47,8 +47,9 @@ import static org.springframework.util.ClassUtils.convertClassNameToResourcePath
public class QualifierAnnotationTests {
private static final String CLASSNAME = QualifierAnnotationTests.class.getName();
private static final String CONFIG_LOCATION =
format("classpath:%s-context.xml", convertClassNameToResourcePath(CLASSNAME));
format("classpath:%s-context.xml", convertClassNameToResourcePath(CLASSNAME));
@Test

2
spring-oxm/spring-oxm.gradle

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

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

@ -50,7 +50,7 @@ class JettyClientHttpResponse implements ClientHttpResponse { @@ -50,7 +50,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
private static final Pattern SAMESITE_PATTERN = Pattern.compile("(?i).*SameSite=(Strict|Lax|None).*");
private static final ClassLoader loader = JettyClientHttpResponse.class.getClassLoader();
private static final ClassLoader classLoader = JettyClientHttpResponse.class.getClassLoader();
private static final boolean jetty10Present;
@ -64,7 +64,7 @@ class JettyClientHttpResponse implements ClientHttpResponse { @@ -64,7 +64,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
static {
try {
Class<?> httpFieldsClass = loader.loadClass("org.eclipse.jetty.http.HttpFields");
Class<?> httpFieldsClass = classLoader.loadClass("org.eclipse.jetty.http.HttpFields");
jetty10Present = httpFieldsClass.isInterface();
}
catch (ClassNotFoundException ex) {
@ -144,7 +144,7 @@ class JettyClientHttpResponse implements ClientHttpResponse { @@ -144,7 +144,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
static {
try {
getHeadersMethod = Response.class.getMethod("getHeaders");
Class<?> type = loader.loadClass("org.eclipse.jetty.http.HttpField");
Class<?> type = classLoader.loadClass("org.eclipse.jetty.http.HttpField");
getNameMethod = type.getMethod("getName");
getValueMethod = type.getMethod("getValue");
}

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

@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> { @@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
private Enumeration<String> names = headers.getFieldNames();
private final Enumeration<String> names = headers.getFieldNames();
@Override
public boolean hasNext() {
@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> { @@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
}
}
private final class HeaderNamesIterator implements Iterator<String> {
private final Iterator<String> iterator;

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

@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> { @@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
private Enumeration<String> names = headers.getFieldNames();
private final Enumeration<String> names = headers.getFieldNames();
@Override
public boolean hasNext() {
@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> { @@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
}
}
private final class HeaderNamesIterator implements Iterator<String> {
private final Iterator<String> iterator;

Loading…
Cancel
Save