Commit f7632226 authored by Johnny Lim's avatar Johnny Lim Committed by Stephane Nicoll

Remove unnecessary String concatenation

Closes gh-4330
parent 831fa1d3
...@@ -91,7 +91,7 @@ public class BasicErrorControllerIntegrationTests { ...@@ -91,7 +91,7 @@ public class BasicErrorControllerIntegrationTests {
load(); load();
ResponseEntity<Map> entity = new TestRestTemplate() ResponseEntity<Map> entity = new TestRestTemplate()
.getForEntity(createUrl("?trace=true"), Map.class); .getForEntity(createUrl("?trace=true"), Map.class);
assertErrorAttributes(entity.getBody(), "500", "" + "Internal Server Error", assertErrorAttributes(entity.getBody(), "500", "Internal Server Error",
IllegalStateException.class, "Expected!", "/"); IllegalStateException.class, "Expected!", "/");
assertFalse("trace parameter should not be set", assertFalse("trace parameter should not be set",
entity.getBody().containsKey("trace")); entity.getBody().containsKey("trace"));
...@@ -103,7 +103,7 @@ public class BasicErrorControllerIntegrationTests { ...@@ -103,7 +103,7 @@ public class BasicErrorControllerIntegrationTests {
load("--server.error.include-stacktrace=on-trace-param"); load("--server.error.include-stacktrace=on-trace-param");
ResponseEntity<Map> entity = new TestRestTemplate() ResponseEntity<Map> entity = new TestRestTemplate()
.getForEntity(createUrl("?trace=true"), Map.class); .getForEntity(createUrl("?trace=true"), Map.class);
assertErrorAttributes(entity.getBody(), "500", "" + "Internal Server Error", assertErrorAttributes(entity.getBody(), "500", "Internal Server Error",
IllegalStateException.class, "Expected!", "/"); IllegalStateException.class, "Expected!", "/");
assertTrue("trace parameter should be set", assertTrue("trace parameter should be set",
entity.getBody().containsKey("trace")); entity.getBody().containsKey("trace"));
...@@ -115,7 +115,7 @@ public class BasicErrorControllerIntegrationTests { ...@@ -115,7 +115,7 @@ public class BasicErrorControllerIntegrationTests {
load("--server.error.include-stacktrace=never"); load("--server.error.include-stacktrace=never");
ResponseEntity<Map> entity = new TestRestTemplate() ResponseEntity<Map> entity = new TestRestTemplate()
.getForEntity(createUrl("?trace=true"), Map.class); .getForEntity(createUrl("?trace=true"), Map.class);
assertErrorAttributes(entity.getBody(), "500", "" + "Internal Server Error", assertErrorAttributes(entity.getBody(), "500", "Internal Server Error",
IllegalStateException.class, "Expected!", "/"); IllegalStateException.class, "Expected!", "/");
assertFalse("trace parameter should not be set", assertFalse("trace parameter should not be set",
entity.getBody().containsKey("trace")); entity.getBody().containsKey("trace"));
...@@ -127,7 +127,7 @@ public class BasicErrorControllerIntegrationTests { ...@@ -127,7 +127,7 @@ public class BasicErrorControllerIntegrationTests {
load("--server.error.include-stacktrace=always"); load("--server.error.include-stacktrace=always");
ResponseEntity<Map> entity = new TestRestTemplate() ResponseEntity<Map> entity = new TestRestTemplate()
.getForEntity(createUrl("?trace=false"), Map.class); .getForEntity(createUrl("?trace=false"), Map.class);
assertErrorAttributes(entity.getBody(), "500", "" + "Internal Server Error", assertErrorAttributes(entity.getBody(), "500", "Internal Server Error",
IllegalStateException.class, "Expected!", "/"); IllegalStateException.class, "Expected!", "/");
assertTrue("trace parameter should be set", assertTrue("trace parameter should be set",
entity.getBody().containsKey("trace")); entity.getBody().containsKey("trace"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment