Skip to content

Commit 38c2f25

Browse files
committed
'Rename' HttpHeaders.getIfNotModifiedSince()
Effectively rename HttpHeaders.getIfNotModifiedSince() to getIfModifiedSince() by adding a new method and deprecating the old one. Issue: SPR-10600
1 parent 6a3a361 commit 38c2f25

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

spring-web/src/main/java/org/springframework/http/HttpHeaders.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -412,8 +412,19 @@ public void setIfModifiedSince(long ifModifiedSince) {
412412
* Returns the value of the {@code IfModifiedSince} header.
413413
* <p>The date is returned as the number of milliseconds since January 1, 1970 GMT. Returns -1 when the date is unknown.
414414
* @return the header value
415+
* @deprecated use {@link #getIfModifiedSince()}
415416
*/
417+
@Deprecated
416418
public long getIfNotModifiedSince() {
419+
return getIfModifiedSince();
420+
}
421+
422+
/**
423+
* Returns the value of the {@code If-Modified-Since} header.
424+
* <p>The date is returned as the number of milliseconds since January 1, 1970 GMT. Returns -1 when the date is unknown.
425+
* @return the header value
426+
*/
427+
public long getIfModifiedSince() {
417428
return getFirstDate(IF_MODIFIED_SINCE);
418429
}
419430

0 commit comments

Comments
 (0)