From 9e6494eef6f7ce254166c0781f71b7f7a1ab74eb Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 22 May 2015 22:31:56 +0200 Subject: [PATCH] Reinstate WebContentGenerator.checkAndPrepare variant Reinstate a variant of the `WebContentGenerator.checkAndPrepare` method for projects that are using it. This variant is now marked as deprecated. Issue: SPR-11792 --- .../web/servlet/support/WebContentGenerator.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java index 42e15381139..2d3f4c83098 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java @@ -312,6 +312,19 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport { checkAndPrepare(request, response, this.cacheControl); } + @Deprecated + protected final void checkAndPrepare( + HttpServletRequest request, HttpServletResponse response, boolean lastModified) + throws ServletException { + + if (lastModified) { + checkAndPrepare(request, response, this.cacheControl.mustRevalidate()); + } + else { + checkAndPrepare(request, response); + } + } + protected final void checkAndPrepare( HttpServletRequest request, HttpServletResponse response, int cacheSeconds) throws ServletException {