From bce850aa12ee678a98a44b1074c7fc5a2f2f8e96 Mon Sep 17 00:00:00 2001 From: Spring Builds Date: Thu, 21 Oct 2021 05:57:00 +0000 Subject: [PATCH 1/3] Next development version (v5.3.13-SNAPSHOT) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index aea3f16f96..b46dbd4870 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=5.3.12-SNAPSHOT +version=5.3.13-SNAPSHOT org.gradle.jvmargs=-Xmx1536M org.gradle.caching=true org.gradle.parallel=true From b3eb1a2ad725ab4e8c9af7e1fe51840fa01289d0 Mon Sep 17 00:00:00 2001 From: no-brand Date: Thu, 21 Oct 2021 07:19:26 +0000 Subject: [PATCH 2/3] Improve example in Javadoc for HttpEntity Closes gh-27586 --- .../src/main/java/org/springframework/http/HttpEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-web/src/main/java/org/springframework/http/HttpEntity.java b/spring-web/src/main/java/org/springframework/http/HttpEntity.java index 7b7fe9af60..d6493c4bed 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpEntity.java +++ b/spring-web/src/main/java/org/springframework/http/HttpEntity.java @@ -28,7 +28,7 @@ import org.springframework.util.ObjectUtils; *
  * HttpHeaders headers = new HttpHeaders();
  * headers.setContentType(MediaType.TEXT_PLAIN);
- * HttpEntity<String> entity = new HttpEntity<String>(helloWorld, headers);
+ * HttpEntity<String> entity = new HttpEntity<String>("helloWorld", headers);
  * URI location = template.postForLocation("https://example.com", entity);
  * 
* or From ec3f857bda2ffbba5d96787215cc99565d95c3cf Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 21 Oct 2021 12:40:10 +0200 Subject: [PATCH 3/3] Polish contribution See gh-27586 --- .../main/java/org/springframework/http/HttpEntity.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/HttpEntity.java b/spring-web/src/main/java/org/springframework/http/HttpEntity.java index d6493c4bed..9b5be7c625 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpEntity.java +++ b/spring-web/src/main/java/org/springframework/http/HttpEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -23,12 +23,12 @@ import org.springframework.util.ObjectUtils; /** * Represents an HTTP request or response entity, consisting of headers and body. * - *

Typically used in combination with the {@link org.springframework.web.client.RestTemplate}, + *

Often used in combination with the {@link org.springframework.web.client.RestTemplate}, * like so: *

  * HttpHeaders headers = new HttpHeaders();
  * headers.setContentType(MediaType.TEXT_PLAIN);
- * HttpEntity<String> entity = new HttpEntity<String>("helloWorld", headers);
+ * HttpEntity<String> entity = new HttpEntity<>("Hello World", headers);
  * URI location = template.postForLocation("https://example.com", entity);
  * 
* or @@ -39,11 +39,11 @@ import org.springframework.util.ObjectUtils; * * Can also be used in Spring MVC, as a return value from a @Controller method: *
- * @RequestMapping("/handle")
+ * @GetMapping("/handle")
  * public HttpEntity<String> handle() {
  *   HttpHeaders responseHeaders = new HttpHeaders();
  *   responseHeaders.set("MyResponseHeader", "MyValue");
- *   return new HttpEntity<String>("Hello World", responseHeaders);
+ *   return new HttpEntity<>("Hello World", responseHeaders);
  * }
  * 
*