diff --git a/spring-beans/src/main/java/org/springframework/beans/Mergeable.java b/spring-beans/src/main/java/org/springframework/beans/Mergeable.java index cba64d94f8..d3d127c026 100644 --- a/spring-beans/src/main/java/org/springframework/beans/Mergeable.java +++ b/spring-beans/src/main/java/org/springframework/beans/Mergeable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2018 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. @@ -41,7 +41,7 @@ public interface Mergeable { * @param parent the object to merge with * @return the result of the merge operation * @throws IllegalArgumentException if the supplied parent is {@code null} - * @exception IllegalStateException if merging is not enabled for this instance + * @throws IllegalStateException if merging is not enabled for this instance * (i.e. {@code mergeEnabled} equals {@code false}). */ Object merge(Object parent); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java index bbb6ec2fbf..076db02977 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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. @@ -217,7 +217,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo /** * Set the autodetection mode to use. - * @exception IllegalArgumentException if the supplied value is not + * @throws IllegalArgumentException if the supplied value is not * one of the {@code AUTODETECT_} constants * @see #setAutodetectModeName(String) * @see #AUTODETECT_ALL @@ -234,7 +234,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo /** * Set the autodetection mode to use by name. - * @exception IllegalArgumentException if the supplied value is not resolvable + * @throws IllegalArgumentException if the supplied value is not resolvable * to one of the {@code AUTODETECT_} constants or is {@code null} * @see #setAutodetectMode(int) * @see #AUTODETECT_ALL @@ -505,7 +505,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo //--------------------------------------------------------------------- /** - * Registers the defined beans with the {@link MBeanServer}. + * Register the defined beans with the {@link MBeanServer}. *
Each bean is exposed to the {@code MBeanServer} via a * {@code ModelMBean}. The actual implemetation of the * {@code ModelMBean} interface used depends on the implementation of @@ -565,7 +565,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo } /** - * Registers an individual bean with the {@link #setServer MBeanServer}. + * Register an individual bean with the {@link #setServer MBeanServer}. *
This method is responsible for deciding how a bean * should be exposed to the {@code MBeanServer}. Specifically, if the * supplied {@code mapValue} is the name of a bean that is configured @@ -632,7 +632,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo } /** - * Replaces any bean names used as keys in the {@code NotificationListener} + * Replace any bean names used as keys in the {@code NotificationListener} * mappings with their corresponding {@code ObjectName} values. * @param beanName the name of the bean to be registered * @param objectName the {@code ObjectName} under which the bean will be registered @@ -666,6 +666,7 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo mbeanToExpose = adaptedBean; } } + if (mbeanToExpose != null) { if (logger.isInfoEnabled()) { logger.info("Located MBean '" + beanKey + "': registering with JMX server as MBean [" + @@ -682,11 +683,12 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo doRegister(mbean, objectName); injectNotificationPublisherIfNecessary(bean, mbean, objectName); } + return objectName; } /** - * Registers beans that are configured for lazy initialization with the + * Register beans that are configured for lazy initialization with the * {@code MBeanServer} indirectly through a proxy. * @param beanName the name of the bean in the {@code BeanFactory} * @param beanKey the key associated with this bean in the beans map diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodArgumentResolverComposite.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodArgumentResolverComposite.java index 1d55191f1f..bdd426eee4 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodArgumentResolverComposite.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodArgumentResolverComposite.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -102,7 +102,7 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu /** * Iterate over registered {@link HandlerMethodArgumentResolver}s and invoke the one that supports it. - * @exception IllegalStateException if no suitable {@link HandlerMethodArgumentResolver} is found. + * @throws IllegalStateException if no suitable {@link HandlerMethodArgumentResolver} is found. */ @Override public Object resolveArgument(MethodParameter parameter, Message> message) throws Exception { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java index f0d65f1cc5..0d0a341503 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -100,7 +100,7 @@ public class InvocableHandlerMethod extends HandlerMethod { * @param message the current message being processed * @param providedArgs "given" arguments matched by type, not resolved * @return the raw value returned by the invoked method - * @exception Exception raised if no suitable argument resolver can be found, + * @throws Exception raised if no suitable argument resolver can be found, * or if the method raised an exception */ public Object invoke(Message> message, Object... providedArgs) throws Exception { diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java index 78a3b50806..b9e5bcb2db 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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. @@ -87,7 +87,7 @@ public abstract class AbstractWebArgumentResolverAdapter implements HandlerMetho /** * Delegate to the {@link WebArgumentResolver} instance. - * @exception IllegalStateException if the resolved value is not assignable + * @throws IllegalStateException if the resolved value is not assignable * to the method parameter. */ @Override diff --git a/spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java b/spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java index 8f6965d7ff..4a264a7213 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -119,7 +119,7 @@ public class InvocableHandlerMethod extends HandlerMethod { * @param mavContainer the ModelAndViewContainer for this request * @param providedArgs "given" arguments matched by type, not resolved * @return the raw value returned by the invoked method - * @exception Exception raised if no suitable argument resolver can be found, + * @throws Exception raised if no suitable argument resolver can be found, * or if the method raised an exception */ public Object invokeForRequest(NativeWebRequest request, ModelAndViewContainer mavContainer, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsServiceConfig.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsServiceConfig.java index 5093b1315d..4dc02a397c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsServiceConfig.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsServiceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2018 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. @@ -68,7 +68,7 @@ public interface SockJsServiceConfig { /** * The codec to use for encoding and decoding SockJS messages. - * @exception IllegalStateException if no {@link SockJsMessageCodec} is available + * @throws IllegalStateException if no {@link SockJsMessageCodec} is available */ SockJsMessageCodec getMessageCodec();