From 43ea25e413322791ae4a629d9b14fbd0389ab194 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Mon, 4 Feb 2019 07:39:25 +0100 Subject: [PATCH 1/4] Improve spring-context-indexer documentation See gh-22339 --- src/docs/asciidoc/core/core-beans.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index 4d3495ceab..cbc70f32fb 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -6302,7 +6302,7 @@ The following example shows how to do so with Gradle: [subs="verbatim,quotes,attributes"] ---- dependencies { - compileOnly("org.springframework:spring-context-indexer:{spring-version}") + annotationProcessor("org.springframework:spring-context-indexer:{spring-version}") } ---- ==== From 229f354df11d149bfb299bc4248b675d2d07abe1 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 4 Feb 2019 10:22:43 +0100 Subject: [PATCH 2/4] Polish "Improve spring-context-indexer documentation" Closes gh-22339 --- src/docs/asciidoc/core/core-beans.adoc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index cbc70f32fb..e434098c49 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -6295,14 +6295,28 @@ how to do so with Maven: ---- ==== -The following example shows how to do so with Gradle: +With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly` +configuration, as shown in the following example: ==== [source,groovy,indent=0] [subs="verbatim,quotes,attributes"] ---- dependencies { - annotationProcessor("org.springframework:spring-context-indexer:{spring-version}") + compileOnly "org.springframework:spring-context-indexer:{spring-version}" + } +---- +==== + +With Gradle 4.6 and later, the dependency should be declared in the `annotationProcessor` +configuration, as shown in the following example: + +==== +[source,groovy,indent=0] +[subs="verbatim,quotes,attributes"] +---- + dependencies { + annotationProcessor "org.springframework:spring-context-indexer:{spring-version}" } ---- ==== From 6507b09c7ff3a27474150fc96a715084d1bf78a8 Mon Sep 17 00:00:00 2001 From: Muhammad Hewedy Date: Sun, 3 Feb 2019 23:51:48 +0300 Subject: [PATCH 3/4] Fix use CompletableFuture in DeferredResultReturnValueHandlerTest See gh-22337 --- .../annotation/DeferredResultReturnValueHandlerTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java index 872498c6cf..397da63985 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java @@ -96,8 +96,8 @@ public class DeferredResultReturnValueHandlerTests { @Test public void completableFuture() throws Exception { - SettableListenableFuture future = new SettableListenableFuture<>(); - testHandle(future, CompletableFuture.class, () -> future.set("foo"), "foo"); + CompletableFuture future = new CompletableFuture<>(); + testHandle(future, CompletableFuture.class, () -> future.complete("foo"), "foo"); } @Test @@ -115,9 +115,9 @@ public class DeferredResultReturnValueHandlerTests { @Test public void completableFutureWithError() throws Exception { - SettableListenableFuture future = new SettableListenableFuture<>(); + CompletableFuture future = new CompletableFuture<>(); IllegalStateException ex = new IllegalStateException(); - testHandle(future, CompletableFuture.class, () -> future.setException(ex), ex); + testHandle(future, CompletableFuture.class, () -> future.completeExceptionally(ex), ex); } From 7c62d7cfe2d2f7982752ed1c23762bad2ed19816 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 4 Feb 2019 10:31:31 +0100 Subject: [PATCH 4/4] Polish "Fix use CompletableFuture in DeferredResultReturnValueHandlerTest" Closes gh-22337 --- .../annotation/DeferredResultReturnValueHandlerTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java index 397da63985..8853f57429 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultReturnValueHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 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.