提交 090e394f 编写于 作者: I izeye 提交者: Juergen Hoeller

Clean up @SuppressWarnings("ConstantConditions")

上级 708e61a7
...@@ -120,8 +120,7 @@ public class DefaultMessageHandlerMethodFactory ...@@ -120,8 +120,7 @@ public class DefaultMessageHandlerMethodFactory
* the ones configured by default. This is an advanced option. For most use cases * the ones configured by default. This is an advanced option. For most use cases
* it should be sufficient to use {@link #setCustomArgumentResolvers(java.util.List)}. * it should be sufficient to use {@link #setCustomArgumentResolvers(java.util.List)}.
*/ */
@SuppressWarnings("ConstantConditions") public void setArgumentResolvers(@Nullable List<HandlerMethodArgumentResolver> argumentResolvers) {
public void setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
if (argumentResolvers == null) { if (argumentResolvers == null) {
this.argumentResolvers.clear(); this.argumentResolvers.clear();
return; return;
......
...@@ -131,7 +131,6 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R ...@@ -131,7 +131,6 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R
* @param message the current message * @param message the current message
* @return the frame type or {@code null} if not found * @return the frame type or {@code null} if not found
*/ */
@SuppressWarnings("ConstantConditions")
@Nullable @Nullable
public static FrameType getFrameType(Message<?> message) { public static FrameType getFrameType(Message<?> message) {
return (FrameType) message.getHeaders().get(RSocketFrameTypeMessageCondition.FRAME_TYPE_HEADER); return (FrameType) message.getHeaders().get(RSocketFrameTypeMessageCondition.FRAME_TYPE_HEADER);
......
...@@ -156,8 +156,7 @@ public class CorsConfiguration { ...@@ -156,8 +156,7 @@ public class CorsConfiguration {
/** /**
* Variant of {@link #setAllowedOrigins} for adding one origin at a time. * Variant of {@link #setAllowedOrigins} for adding one origin at a time.
*/ */
@SuppressWarnings("ConstantConditions") public void addAllowedOrigin(@Nullable String origin) {
public void addAllowedOrigin(String origin) {
if (origin == null) { if (origin == null) {
return; return;
} }
...@@ -222,8 +221,7 @@ public class CorsConfiguration { ...@@ -222,8 +221,7 @@ public class CorsConfiguration {
* Variant of {@link #setAllowedOriginPatterns} for adding one origin at a time. * Variant of {@link #setAllowedOriginPatterns} for adding one origin at a time.
* @since 5.3 * @since 5.3
*/ */
@SuppressWarnings("ConstantConditions") public void addAllowedOriginPattern(@Nullable String originPattern) {
public void addAllowedOriginPattern(String originPattern) {
if (originPattern == null) { if (originPattern == null) {
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册