From fabe35fdc4773301a73690c5aa76929aa04ba427 Mon Sep 17 00:00:00 2001 From: Oscar Utbult Date: Tue, 29 Nov 2016 22:29:04 +0100 Subject: [PATCH] Remove redundant toString() invocation Closes gh-7527 --- .../autoconfigure/web/BasicErrorControllerIntegrationTests.java | 2 +- .../boot/loader/archive/ExplodedArchiveTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java mode change 100644 => 100755 spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java old mode 100644 new mode 100755 index 59dec7f769f..a0b567d1756 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java @@ -182,7 +182,7 @@ public class BasicErrorControllerIntegrationTests { .accept(MediaType.TEXT_HTML).build(); ResponseEntity entity = new TestRestTemplate().exchange(request, String.class); - String resp = entity.getBody().toString(); + String resp = entity.getBody(); assertThat(resp).contains("We are out of storage"); } diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java old mode 100644 new mode 100755 index 5eb16f948b6..3166ed3bd9a --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java @@ -190,7 +190,7 @@ public class ExplodedArchiveTests { private Map getEntriesMap(Archive archive) { Map entries = new HashMap(); for (Archive.Entry entry : archive) { - entries.put(entry.getName().toString(), entry); + entries.put(entry.getName(), entry); } return entries; }