From 5243adce22061126ac87aa76b9f4c19a82875af0 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 30 May 2018 18:12:20 -0700 Subject: [PATCH] Restore Java 1.6 compatibility --- .../boot/autoconfigure/web/ServerProperties.java | 2 +- .../org/springframework/boot/web/support/ErrorPageFilter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index fe8dac9a37d..a87f0ade86d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -864,7 +864,7 @@ public class ServerProperties .getIncludeStacktrace() == ErrorProperties.IncludeStacktrace.NEVER) { customizeErrorReportValve(factory); } - Cookie cookie = serverProperties.getSession().getCookie(); + final Cookie cookie = serverProperties.getSession().getCookie(); if (cookie.getHttpOnly() != null) { factory.addContextCustomizers(new TomcatContextCustomizer() { diff --git a/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java b/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java index 41826d1bdbd..999969310fa 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java @@ -84,7 +84,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry { private static final Set> CLIENT_ABORT_EXCEPTIONS; static { - Set> clientAbortExceptions = new HashSet<>(); + Set> clientAbortExceptions = new HashSet>(); addClassIfPresent(clientAbortExceptions, "org.apache.catalina.connector.ClientAbortException"); CLIENT_ABORT_EXCEPTIONS = Collections.unmodifiableSet(clientAbortExceptions);