From 21628a9a5947349b8d3769b357b0a043fdda7a36 Mon Sep 17 00:00:00 2001 From: igor-suhorukov Date: Tue, 20 Mar 2018 01:32:54 +0300 Subject: [PATCH] Polish Closes gh-12553 --- .../web/servlet/error/BasicErrorController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java index 0bd7571778..acef4b10cb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 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. @@ -89,7 +89,7 @@ public class BasicErrorController extends AbstractErrorController { Map body = getErrorAttributes(request, isIncludeStackTrace(request, MediaType.ALL)); HttpStatus status = getStatus(request); - return new ResponseEntity>(body, status); + return new ResponseEntity<>(body, status); } @RequestMapping(produces = "text/html") @@ -111,7 +111,7 @@ public class BasicErrorController extends AbstractErrorController { for (Map.Entry entry : attributes.entrySet()) { padding = Math.max(padding, entry.getKey().length()); } - StringBuffer body = new StringBuffer(); + StringBuilder body = new StringBuilder(); for (Map.Entry entry : attributes.entrySet()) { body.append(String.format("%-" + padding + "s : %s%n", entry.getKey(), entry.getValue()));