diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java index 4d3da400225..81edc067036 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -37,7 +37,7 @@ public abstract class AbstractCacheInvoker { } protected AbstractCacheInvoker(CacheErrorHandler errorHandler) { - Assert.notNull("ErrorHandler must not be null"); + Assert.notNull(errorHandler, "ErrorHandler must not be null"); this.errorHandler = errorHandler; } diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsMessagingTemplate.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsMessagingTemplate.java index 7a22c041a1c..43fcf0eb362 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsMessagingTemplate.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsMessagingTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. @@ -73,7 +73,7 @@ public class JmsMessagingTemplate extends AbstractMessagingTemplate * Create a {@code JmsMessagingTemplate} instance with the {@link JmsTemplate} to use. */ public JmsMessagingTemplate(JmsTemplate jmsTemplate) { - Assert.notNull("JmsTemplate must not be null"); + Assert.notNull(jmsTemplate, "JmsTemplate must not be null"); this.jmsTemplate = jmsTemplate; } diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java index f27c056ceb8..fc1ed072cad 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -62,8 +62,8 @@ public class JettyWebSocketHandlerAdapter { public JettyWebSocketHandlerAdapter(WebSocketHandler handler, Function sessionFactory) { - Assert.notNull("WebSocketHandler is required"); - Assert.notNull("'sessionFactory' is required"); + Assert.notNull(handler, "WebSocketHandler is required"); + Assert.notNull(sessionFactory, "'sessionFactory' is required"); this.delegateHandler = handler; this.sessionFactory = sessionFactory; } diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/StandardWebSocketHandlerAdapter.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/StandardWebSocketHandlerAdapter.java index d0c9aa613d3..408b3657f07 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/StandardWebSocketHandlerAdapter.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/StandardWebSocketHandlerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -53,8 +53,8 @@ public class StandardWebSocketHandlerAdapter extends Endpoint { public StandardWebSocketHandlerAdapter(WebSocketHandler handler, Function sessionFactory) { - Assert.notNull("WebSocketHandler is required"); - Assert.notNull("'sessionFactory' is required"); + Assert.notNull(handler, "WebSocketHandler is required"); + Assert.notNull(sessionFactory, "'sessionFactory' is required"); this.delegateHandler = handler; this.sessionFactory = sessionFactory; } diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketHandlerAdapter.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketHandlerAdapter.java index 313bc0997d2..6ad40ee97cf 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketHandlerAdapter.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketHandlerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -47,7 +47,7 @@ public class UndertowWebSocketHandlerAdapter extends AbstractReceiveListener { public UndertowWebSocketHandlerAdapter(UndertowWebSocketSession session) { - Assert.notNull("UndertowWebSocketSession is required"); + Assert.notNull(session, "UndertowWebSocketSession is required"); this.session = session; } diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java b/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java index fee98d0af80..e1346e9cf2e 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -55,7 +55,7 @@ public class ReactorServerHttpRequest extends AbstractServerHttpRequest { } private static URI initUri(HttpServerRequest channel) { - Assert.notNull("'channel' must not be null"); + Assert.notNull(channel, "'channel' must not be null"); InetSocketAddress address = channel.remoteAddress(); return (address == null ? URI.create(channel.uri()) : getBaseUrl(address).resolve(channel.uri())); } diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java index baab862abe7..36a95cb689c 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -50,7 +50,7 @@ public class ReactorServerHttpResponse extends AbstractServerHttpResponse public ReactorServerHttpResponse(HttpServerResponse response, DataBufferFactory bufferFactory) { super(bufferFactory); - Assert.notNull("'response' must not be null."); + Assert.notNull(response, "'response' must not be null."); this.response = response; } diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java index b1b38bc0ea4..26c9d9f0afb 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java @@ -62,7 +62,7 @@ public class RxNettyServerHttpRequest extends AbstractServerHttpRequest { } private static URI initUri(HttpServerRequest request) { - Assert.notNull("'request', request must not be null"); + Assert.notNull(request, "'request' must not be null"); return StringUtils.isEmpty(request.getHostHeader()) ? URI.create(request.getUri()) : getBaseUrl(request).resolve(request.getUri()); } diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java index d1c54a36ef2..71c9f334426 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -56,7 +56,7 @@ public class RxNettyServerHttpResponse extends AbstractServerHttpResponse { public RxNettyServerHttpResponse(HttpServerResponse response, NettyDataBufferFactory dataBufferFactory) { super(dataBufferFactory); - Assert.notNull("'response', response must not be null."); + Assert.notNull(response, "'response' must not be null."); this.response = response; }