From 38c2f253ed743a143e54ef95f7525daedece2486 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 26 Jun 2013 10:35:13 -0700 Subject: [PATCH] 'Rename' HttpHeaders.getIfNotModifiedSince() Effectively rename HttpHeaders.getIfNotModifiedSince() to getIfModifiedSince() by adding a new method and deprecating the old one. Issue: SPR-10600 --- .../java/org/springframework/http/HttpHeaders.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java index c41d04d69e..7e538ffe92 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java +++ b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -412,8 +412,19 @@ public class HttpHeaders implements MultiValueMap, Serializable * Returns the value of the {@code IfModifiedSince} header. *

The date is returned as the number of milliseconds since January 1, 1970 GMT. Returns -1 when the date is unknown. * @return the header value + * @deprecated use {@link #getIfModifiedSince()} */ + @Deprecated public long getIfNotModifiedSince() { + return getIfModifiedSince(); + } + + /** + * Returns the value of the {@code If-Modified-Since} header. + *

The date is returned as the number of milliseconds since January 1, 1970 GMT. Returns -1 when the date is unknown. + * @return the header value + */ + public long getIfModifiedSince() { return getFirstDate(IF_MODIFIED_SINCE); }