From 5910d2d4dcdebe248eea8bccb61f150c8f9e9c37 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 13 May 2019 18:03:01 +0200 Subject: [PATCH 1/3] Add missing Nullable annotation to assertNotNull See gh-22932 --- .../java/org/springframework/test/util/AssertionErrors.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java b/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java index aea7f8e4cf..1865847673 100644 --- a/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java +++ b/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java @@ -76,9 +76,9 @@ public abstract class AssertionErrors { * {@link AssertionError} otherwise. * @param message a message that describes the reason for the failure * @param object the object to check - * @since 5.1 + * @since 5.1.8 */ - public static void assertNotNull(String message, Object object) { + public static void assertNotNull(String message, @Nullable Object object) { assertTrue(message, object != null); } From 4af94dfc5d339733d878f6f1f52404035305bc28 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 13 May 2019 18:03:12 +0200 Subject: [PATCH 2/3] Clarify AbstractBeanDefinition.getBeanClass() return semantics Closes gh-22960 --- .../factory/support/AbstractBeanDefinition.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java index c64b1a7ee2..f28218afd8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java @@ -397,10 +397,13 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess } /** - * Return the class of the wrapped bean, if already resolved. - * @return the bean class, or {@code null} if none defined + * Return the class of the wrapped bean (assuming it is resolved already). + * @return the bean class (never {@code null}) * @throws IllegalStateException if the bean definition does not define a bean class, - * or a specified bean class name has not been resolved into an actual Class + * or a specified bean class name has not been resolved into an actual Class yet + * @see #hasBeanClass() + * @see #setBeanClass(Class) + * @see #resolveBeanClass(ClassLoader) */ public Class getBeanClass() throws IllegalStateException { Object beanClassObject = this.beanClass; @@ -416,6 +419,9 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return whether this definition specifies a bean class. + * @see #getBeanClass() + * @see #setBeanClass(Class) + * @see #resolveBeanClass(ClassLoader) */ public boolean hasBeanClass() { return (this.beanClass instanceof Class); From 0796d9af0da916daa2e0fc6ec0a6885592982bae Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 13 May 2019 18:03:23 +0200 Subject: [PATCH 3/3] Upgrade to Groovy 2.5.7 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0c8116599b..51e7ef5c50 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { aspectjVersion = "1.9.3" freemarkerVersion = "2.3.28" - groovyVersion = "2.5.6" + groovyVersion = "2.5.7" hsqldbVersion = "2.4.1" jackson2Version = "2.9.8" jettyVersion = "9.4.18.v20190429"