CloseStatus.java (spring-framework-5.3.23) | : | CloseStatus.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright 2002-2020 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 155 | skipping to change at line 155 | |||
public CloseStatus(int code) { | public CloseStatus(int code) { | |||
this(code, null); | this(code, null); | |||
} | } | |||
/** | /** | |||
* Create a new {@link CloseStatus} instance. | * Create a new {@link CloseStatus} instance. | |||
* @param code the status code | * @param code the status code | |||
* @param reason the reason | * @param reason the reason | |||
*/ | */ | |||
public CloseStatus(int code, @Nullable String reason) { | public CloseStatus(int code, @Nullable String reason) { | |||
Assert.isTrue((code >= 1000 && code < 5000), "Invalid status code "); | Assert.isTrue((code >= 1000 && code < 5000), () -> "Invalid statu s code: " + code); | |||
this.code = code; | this.code = code; | |||
this.reason = reason; | this.reason = reason; | |||
} | } | |||
/** | /** | |||
* Return the status code. | * Return the status code. | |||
*/ | */ | |||
public int getCode() { | public int getCode() { | |||
return this.code; | return this.code; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |