Skip to content

Commit 78720fd

Browse files
Merge remote-tracking branch 'remotes/origin/master' into webclient_apache
2 parents 85dd3b7 + 1f72ab4 commit 78720fd

File tree

40 files changed

+342
-282
lines changed

40 files changed

+342
-282
lines changed

build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ configure(allprojects) { project ->
2727
dependencyManagement {
2828
imports {
2929
mavenBom "com.fasterxml.jackson:jackson-bom:2.10.3"
30-
mavenBom "io.netty:netty-bom:4.1.47.Final"
31-
mavenBom "io.projectreactor:reactor-bom:Dysprosium-SR5"
30+
mavenBom "io.netty:netty-bom:4.1.48.Final"
31+
mavenBom "io.projectreactor:reactor-bom:Dysprosium-BUILD-SNAPSHOT"
3232
mavenBom "io.rsocket:rsocket-bom:1.0.0-RC6"
3333
mavenBom "org.eclipse.jetty:jetty-bom:9.4.27.v20200227"
3434
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.3.70"
35-
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.2"
35+
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.5"
3636
mavenBom "org.junit:junit-bom:5.6.0"
3737
}
3838
dependencies {
@@ -43,16 +43,14 @@ configure(allprojects) { project ->
4343
entry 'log4j-jul'
4444
}
4545
dependency "org.slf4j:slf4j-api:1.7.30"
46-
4746
dependency "com.google.code.findbugs:jsr305:3.0.2"
4847

4948
dependencySet(group: 'org.aspectj', version: '1.9.5') {
5049
entry 'aspectjrt'
5150
entry 'aspectjtools'
5251
entry 'aspectjweaver'
5352
}
54-
// If customJavaHome has been set, we assume we need Groovy 3.0 for testing purposes.
55-
dependencySet(group: 'org.codehaus.groovy', version: System.getProperty("customJavaHome") ? '3.0.1' : '2.5.9') {
53+
dependencySet(group: 'org.codehaus.groovy', version: '2.5.10') {
5654
entry 'groovy'
5755
entry 'groovy-jsr223'
5856
entry 'groovy-templates'
@@ -283,6 +281,7 @@ configure(allprojects) { project ->
283281
repositories {
284282
mavenCentral()
285283
maven { url "https://repo.spring.io/libs-spring-framework-build" }
284+
maven { url "https://repo.spring.io/snapshot" } // Reactor
286285
}
287286
}
288287
configurations.all {
@@ -329,7 +328,7 @@ configure([rootProject] + javaProjects) { project ->
329328
}
330329

331330
checkstyle {
332-
toolVersion = "8.29"
331+
toolVersion = "8.30"
333332
configDir = rootProject.file("src/checkstyle")
334333
}
335334

gradle/custom-java-home.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
// the one used to launch the Gradle process).
66
//
77
// - customJavaHome: absolute path to the alternate JDK installation to
8-
// use to compile Java code and execute tests. Setting this system
9-
// property causes Groovy 3.0 RC3 to be used instead of 2.5.x. This
10-
// system property is also used in spring-oxm.gradle to determine
11-
// whether JiBX is supported.
8+
// use to compile Java code and execute tests. This system property
9+
// is also used in spring-oxm.gradle to determine whether JiBX is
10+
// supported.
1211
//
1312
// - customJavaSourceVersion: Java version supplied to the `--release`
1413
// command line flag to control the Java source and target

gradle/docs.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010
maven {
1111
url "https://repo.spring.io/release"
1212
mavenContent {
13-
group "io.spring.asciidoctor"
13+
includeGroup "io.spring.asciidoctor"
1414
}
1515
}
1616
}

spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionReaderUtils.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,13 @@ else if (definition.getFactoryBeanName() != null) {
118118
"'class' nor 'parent' nor 'factory-bean' - can't generate bean name");
119119
}
120120

121-
String id = generatedBeanName;
122121
if (isInnerBean) {
123122
// Inner bean: generate identity hashcode suffix.
124-
id = generatedBeanName + GENERATED_BEAN_NAME_SEPARATOR + ObjectUtils.getIdentityHexString(definition);
123+
return generatedBeanName + GENERATED_BEAN_NAME_SEPARATOR + ObjectUtils.getIdentityHexString(definition);
125124
}
126-
else {
127-
// Top-level bean: use plain class name with unique suffix if necessary.
128-
return uniqueBeanName(generatedBeanName, registry);
129-
}
130-
return id;
125+
126+
// Top-level bean: use plain class name with unique suffix if necessary.
127+
return uniqueBeanName(generatedBeanName, registry);
131128
}
132129

133130
/**

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,6 @@ private static class DeferredImportSelectorGrouping {
865865
this.group = group;
866866
}
867867

868-
public Group getGroup() {
869-
return this.group;
870-
}
871-
872868
public void add(DeferredImportSelectorHolder deferredImport) {
873869
this.deferredImports.add(deferredImport);
874870
}

spring-context/src/main/java/org/springframework/format/number/money/Jsr354NumberFormatAnnotationFormatterFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -53,9 +53,8 @@ public class Jsr354NumberFormatAnnotationFormatterFactory extends EmbeddedValueR
5353

5454

5555
@Override
56-
@SuppressWarnings("unchecked")
5756
public Set<Class<?>> getFieldTypes() {
58-
return (Set) Collections.singleton(MonetaryAmount.class);
57+
return Collections.singleton(MonetaryAmount.class);
5958
}
6059

6160
@Override

spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedAttribute.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -22,6 +22,8 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25+
import javax.management.Descriptor;
26+
2527
/**
2628
* Method-level annotation that indicates to expose a given bean property as a
2729
* JMX attribute, corresponding to the {@code ManagedAttribute} attribute.
@@ -36,14 +38,29 @@
3638
@Documented
3739
public @interface ManagedAttribute {
3840

41+
/**
42+
* Set the default value for the attribute in a JMX {@link Descriptor}.
43+
*/
3944
String defaultValue() default "";
4045

46+
/**
47+
* Set the description for the attribute a JMX {@link Descriptor}.
48+
*/
4149
String description() default "";
4250

51+
/**
52+
* Set the currency time limit field in a JMX {@link Descriptor}.
53+
*/
4354
int currencyTimeLimit() default -1;
4455

56+
/**
57+
* Set the persistPolicy field in a JMX {@link Descriptor}.
58+
*/
4559
String persistPolicy() default "";
4660

61+
/**
62+
* Set the persistPeriod field in a JMX {@link Descriptor}.
63+
*/
4764
int persistPeriod() default -1;
4865

4966
}

spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericParameterMatchingTests.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-2020 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.
@@ -28,7 +28,7 @@
2828
import static org.assertj.core.api.Assertions.assertThat;
2929

3030
/**
31-
* Tests that poitncut matching is correct with generic method parameter.
31+
* Tests that pointcut matching is correct with generic method parameter.
3232
* See SPR-3904 for more details.
3333
*
3434
* @author Ramnivas Laddad

spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static AnnotatedElement forAnnotations(Annotation... annotations) {
111111
* @param element the annotated element
112112
* @param annotationType the annotation type on which to find meta-annotations
113113
* @return the names of all meta-annotations present on the annotation,
114-
* or {@code null} if not found
114+
* or an empty set if not found
115115
* @since 4.2
116116
* @see #getMetaAnnotationTypes(AnnotatedElement, String)
117117
* @see #hasMetaAnnotationTypes

spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibiltyTests.java

Lines changed: 3 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-2020 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.
@@ -84,11 +84,11 @@ static class WithMetaMetaTestAnnotation1AndMetaTestAnnotation2 {
8484
@Retention(RetentionPolicy.RUNTIME)
8585
@interface DefaultValueAnnotation {
8686

87-
@AliasFor("enumAlais")
87+
@AliasFor("enumAlias")
8888
TestEnum enumValue() default TestEnum.ONE;
8989

9090
@AliasFor("enumValue")
91-
TestEnum enumAlais() default TestEnum.ONE;
91+
TestEnum enumAlias() default TestEnum.ONE;
9292

9393
}
9494

spring-core/src/test/java/org/springframework/core/annotation/AnnotationTypeMappingsTests.java

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -382,26 +382,28 @@ void resolveMirrorsWhenHasDifferentValuesThrowsException() {
382382
}
383383

384384
@Test
385-
void resolveMirrorsWhenHasWithMulipleRoutesToAliasReturnsMirrors() {
386-
AnnotationTypeMappings mappings = AnnotationTypeMappings.forAnnotationType(MulipleRoutesToAliasA.class);
387-
AnnotationTypeMapping mappingsA = getMapping(mappings, MulipleRoutesToAliasA.class);
385+
void resolveMirrorsWhenHasWithMultipleRoutesToAliasReturnsMirrors() {
386+
AnnotationTypeMappings mappings = AnnotationTypeMappings.forAnnotationType(
387+
MultipleRoutesToAliasA.class);
388+
AnnotationTypeMapping mappingsA = getMapping(mappings, MultipleRoutesToAliasA.class);
388389
assertThat(mappingsA.getMirrorSets().size()).isZero();
389-
AnnotationTypeMapping mappingsB = getMapping(mappings, MulipleRoutesToAliasB.class);
390+
AnnotationTypeMapping mappingsB = getMapping(mappings, MultipleRoutesToAliasB.class);
390391
assertThat(getNames(mappingsB.getMirrorSets().get(0))).containsExactly("b1", "b2", "b3");
391-
AnnotationTypeMapping mappingsC = getMapping(mappings, MulipleRoutesToAliasC.class);
392+
AnnotationTypeMapping mappingsC = getMapping(mappings, MultipleRoutesToAliasC.class);
392393
assertThat(getNames(mappingsC.getMirrorSets().get(0))).containsExactly("c1", "c2");
393394
}
394395

395396
@Test
396-
void getAliasMappingWhenHasWithMulipleRoutesToAliasReturnsMappedAttributes() {
397-
AnnotationTypeMappings mappings = AnnotationTypeMappings.forAnnotationType(MulipleRoutesToAliasA.class);
398-
AnnotationTypeMapping mappingsA = getMapping(mappings, MulipleRoutesToAliasA.class);
397+
void getAliasMappingWhenHasWithMultipleRoutesToAliasReturnsMappedAttributes() {
398+
AnnotationTypeMappings mappings = AnnotationTypeMappings.forAnnotationType(
399+
MultipleRoutesToAliasA.class);
400+
AnnotationTypeMapping mappingsA = getMapping(mappings, MultipleRoutesToAliasA.class);
399401
assertThat(getAliasMapping(mappingsA, 0)).isNull();
400-
AnnotationTypeMapping mappingsB = getMapping(mappings, MulipleRoutesToAliasB.class);
402+
AnnotationTypeMapping mappingsB = getMapping(mappings, MultipleRoutesToAliasB.class);
401403
assertThat(getAliasMapping(mappingsB, 0).getName()).isEqualTo("a1");
402404
assertThat(getAliasMapping(mappingsB, 1).getName()).isEqualTo("a1");
403405
assertThat(getAliasMapping(mappingsB, 2).getName()).isEqualTo("a1");
404-
AnnotationTypeMapping mappingsC = getMapping(mappings, MulipleRoutesToAliasC.class);
406+
AnnotationTypeMapping mappingsC = getMapping(mappings, MultipleRoutesToAliasC.class);
405407
assertThat(getAliasMapping(mappingsC, 0).getName()).isEqualTo("a1");
406408
assertThat(getAliasMapping(mappingsC, 1).getName()).isEqualTo("a1");
407409
}
@@ -867,7 +869,7 @@ static class WithDefaultValueAliasPair {
867869
}
868870

869871
@Retention(RetentionPolicy.RUNTIME)
870-
@interface MulipleRoutesToAliasC {
872+
@interface MultipleRoutesToAliasC {
871873

872874
@AliasFor("c2")
873875
String c1() default "";
@@ -877,24 +879,24 @@ static class WithDefaultValueAliasPair {
877879
}
878880

879881
@Retention(RetentionPolicy.RUNTIME)
880-
@MulipleRoutesToAliasC
881-
@interface MulipleRoutesToAliasB {
882+
@MultipleRoutesToAliasC
883+
@interface MultipleRoutesToAliasB {
882884

883-
@AliasFor(annotation = MulipleRoutesToAliasC.class, attribute = "c2")
885+
@AliasFor(annotation = MultipleRoutesToAliasC.class, attribute = "c2")
884886
String b1() default "";
885887

886-
@AliasFor(annotation = MulipleRoutesToAliasC.class, attribute = "c2")
888+
@AliasFor(annotation = MultipleRoutesToAliasC.class, attribute = "c2")
887889
String b2() default "";
888890

889-
@AliasFor(annotation = MulipleRoutesToAliasC.class, attribute = "c1")
891+
@AliasFor(annotation = MultipleRoutesToAliasC.class, attribute = "c1")
890892
String b3() default "";
891893
}
892894

893895
@Retention(RetentionPolicy.RUNTIME)
894-
@MulipleRoutesToAliasB
895-
@interface MulipleRoutesToAliasA {
896+
@MultipleRoutesToAliasB
897+
@interface MultipleRoutesToAliasA {
896898

897-
@AliasFor(annotation = MulipleRoutesToAliasB.class, attribute = "b2")
899+
@AliasFor(annotation = MultipleRoutesToAliasB.class, attribute = "b2")
898900
String a1() default "";
899901
}
900902

spring-core/src/test/java/org/springframework/core/annotation/AnnotationsScannerTests.java

Lines changed: 8 additions & 8 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-2020 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.
@@ -86,7 +86,7 @@ void directStrategyOnClassHierarchyScansInCorrectOrder() {
8686
}
8787

8888
@Test
89-
void inheritedAnnotationsStrategyOnClassWhenNotAnnoatedScansNone() {
89+
void inheritedAnnotationsStrategyOnClassWhenNotAnnotatedScansNone() {
9090
Class<?> source = WithNoAnnotations.class;
9191
assertThat(scan(source, SearchStrategy.INHERITED_ANNOTATIONS)).isEmpty();
9292
}
@@ -137,7 +137,7 @@ void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncudesOnl
137137
}
138138

139139
@Test
140-
void superclassStrategyOnClassWhenNotAnnoatedScansNone() {
140+
void superclassStrategyOnClassWhenNotAnnotatedScansNone() {
141141
Class<?> source = WithNoAnnotations.class;
142142
assertThat(scan(source, SearchStrategy.SUPERCLASS)).isEmpty();
143143
}
@@ -179,7 +179,7 @@ void superclassStrategyOnClassHierarchyScansInCorrectOrder() {
179179
}
180180

181181
@Test
182-
void typeHierarchyStrategyOnClassWhenNotAnnoatedScansNone() {
182+
void typeHierarchyStrategyOnClassWhenNotAnnotatedScansNone() {
183183
Class<?> source = WithNoAnnotations.class;
184184
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY)).isEmpty();
185185
}
@@ -222,7 +222,7 @@ void typeHierarchyStrategyOnClassHierarchyScansInCorrectOrder() {
222222
}
223223

224224
@Test
225-
void directStrategyOnMethodWhenNotAnnoatedScansNone() {
225+
void directStrategyOnMethodWhenNotAnnotatedScansNone() {
226226
Method source = methodFrom(WithNoAnnotations.class);
227227
assertThat(scan(source, SearchStrategy.DIRECT)).isEmpty();
228228
}
@@ -263,7 +263,7 @@ void directStrategyOnMethodHierarchyScansInCorrectOrder() {
263263
}
264264

265265
@Test
266-
void inheritedAnnotationsStrategyOnMethodWhenNotAnnoatedScansNone() {
266+
void inheritedAnnotationsStrategyOnMethodWhenNotAnnotatedScansNone() {
267267
Method source = methodFrom(WithNoAnnotations.class);
268268
assertThat(scan(source, SearchStrategy.INHERITED_ANNOTATIONS)).isEmpty();
269269
}
@@ -304,7 +304,7 @@ void inheritedAnnotationsStrategyOnMethodHierarchyScansInCorrectOrder() {
304304
}
305305

306306
@Test
307-
void superclassStrategyOnMethodWhenNotAnnoatedScansNone() {
307+
void superclassStrategyOnMethodWhenNotAnnotatedScansNone() {
308308
Method source = methodFrom(WithNoAnnotations.class);
309309
assertThat(scan(source, SearchStrategy.SUPERCLASS)).isEmpty();
310310
}
@@ -346,7 +346,7 @@ void superclassStrategyOnMethodHierarchyScansInCorrectOrder() {
346346
}
347347

348348
@Test
349-
void typeHierarchyStrategyOnMethodWhenNotAnnoatedScansNone() {
349+
void typeHierarchyStrategyOnMethodWhenNotAnnotatedScansNone() {
350350
Method source = methodFrom(WithNoAnnotations.class);
351351
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY)).isEmpty();
352352
}

0 commit comments

Comments
 (0)