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()));