RelativeRedirectFilter.java (spring-framework-5.3.23) | : | RelativeRedirectFilter.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright 2002-2018 the original author or authors. | * Copyright 2002-2022 the original author or authors. | |||
* | * | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | * You may obtain a copy of the License at | |||
* | * | |||
* https://www.apache.org/licenses/LICENSE-2.0 | * https://www.apache.org/licenses/LICENSE-2.0 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
skipping to change at line 55 | skipping to change at line 55 | |||
private HttpStatus redirectStatus = HttpStatus.SEE_OTHER; | private HttpStatus redirectStatus = HttpStatus.SEE_OTHER; | |||
/** | /** | |||
* Set the default HTTP Status to use for redirects. | * Set the default HTTP Status to use for redirects. | |||
* <p>By default this is {@link HttpStatus#SEE_OTHER}. | * <p>By default this is {@link HttpStatus#SEE_OTHER}. | |||
* @param status the 3xx redirect status to use | * @param status the 3xx redirect status to use | |||
*/ | */ | |||
public void setRedirectStatus(HttpStatus status) { | public void setRedirectStatus(HttpStatus status) { | |||
Assert.notNull(status, "Property 'redirectStatus' is required"); | Assert.notNull(status, "Property 'redirectStatus' is required"); | |||
Assert.isTrue(status.is3xxRedirection(), "Not a redirect status c ode"); | Assert.isTrue(status.is3xxRedirection(), () -> "Not a redirect st atus code: " + status); | |||
this.redirectStatus = status; | this.redirectStatus = status; | |||
} | } | |||
/** | /** | |||
* Return the configured redirect status. | * Return the configured redirect status. | |||
*/ | */ | |||
public HttpStatus getRedirectStatus() { | public HttpStatus getRedirectStatus() { | |||
return this.redirectStatus; | return this.redirectStatus; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |