Skip to content

Commit e402a93

Browse files
committed
Merge branch '5.1.x'
2 parents 0742986 + 99da6e9 commit e402a93

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java

+5-5
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-2019 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.
@@ -96,8 +96,8 @@ public void listenableFuture() throws Exception {
9696

9797
@Test
9898
public void completableFuture() throws Exception {
99-
SettableListenableFuture<String> future = new SettableListenableFuture<>();
100-
testHandle(future, CompletableFuture.class, () -> future.set("foo"), "foo");
99+
CompletableFuture<String> future = new CompletableFuture<>();
100+
testHandle(future, CompletableFuture.class, () -> future.complete("foo"), "foo");
101101
}
102102

103103
@Test
@@ -115,9 +115,9 @@ public void listenableFutureWithError() throws Exception {
115115

116116
@Test
117117
public void completableFutureWithError() throws Exception {
118-
SettableListenableFuture<String> future = new SettableListenableFuture<>();
118+
CompletableFuture<String> future = new CompletableFuture<>();
119119
IllegalStateException ex = new IllegalStateException();
120-
testHandle(future, CompletableFuture.class, () -> future.setException(ex), ex);
120+
testHandle(future, CompletableFuture.class, () -> future.completeExceptionally(ex), ex);
121121
}
122122

123123

src/docs/asciidoc/core/core-beans.adoc

+16-2
Original file line numberDiff line numberDiff line change
@@ -5952,13 +5952,27 @@ how to do so with Maven:
59525952
</dependencies>
59535953
----
59545954

5955-
The following example shows how to do so with Gradle:
5955+
With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly`
5956+
configuration, as shown in the following example:
59565957

59575958
[source,groovy,indent=0]
59585959
[subs="verbatim,quotes,attributes"]
59595960
----
59605961
dependencies {
5961-
compileOnly("org.springframework:spring-context-indexer:{spring-version}")
5962+
compileOnly "org.springframework:spring-context-indexer:{spring-version}"
5963+
}
5964+
----
5965+
====
5966+
5967+
With Gradle 4.6 and later, the dependency should be declared in the `annotationProcessor`
5968+
configuration, as shown in the following example:
5969+
5970+
====
5971+
[source,groovy,indent=0]
5972+
[subs="verbatim,quotes,attributes"]
5973+
----
5974+
dependencies {
5975+
annotationProcessor "org.springframework:spring-context-indexer:{spring-version}"
59625976
}
59635977
----
59645978

0 commit comments

Comments
 (0)