From e2e4cbe6b3cb017f7567ddb2f73b2dc9cdf3c9d9 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 25 Feb 2013 11:56:57 -0800 Subject: [PATCH] Deprecate HttpStatus.MOVED_TEMPORARILY Deprecate HttpStatus.MOVED_TEMPORARILY in favor of HttpStatus.FOUND since HttpStatus.valueOf(302) will always return FOUND. The name of the 302 status code was changed between HTTP 1.0 and HTTP 1.1 but the underlying meaning remains the same. Issue: SPR-10300 --- .../src/main/java/org/springframework/http/HttpStatus.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-web/src/main/java/org/springframework/http/HttpStatus.java b/spring-web/src/main/java/org/springframework/http/HttpStatus.java index 74dc2af2c2..225fbccd9f 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpStatus.java +++ b/spring-web/src/main/java/org/springframework/http/HttpStatus.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. @@ -125,7 +125,9 @@ public enum HttpStatus { /** * {@code 302 Moved Temporarily}. * @see HTTP/1.0 + * @deprecated In favor of {@link #FOUND} which will be returned from {@code HttpStatus.valueOf(302)} */ + @Deprecated MOVED_TEMPORARILY(302, "Moved Temporarily"), /** * {@code 303 See Other}.