Browse Source

Merge branch '5.1.x'

pull/22982/head
Juergen Hoeller 6 years ago
parent
commit
9755b59197
  1. 2
      build.gradle
  2. 12
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java
  3. 4
      spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java

2
build.gradle

@ -31,7 +31,7 @@ ext {
aspectjVersion = "1.9.3" aspectjVersion = "1.9.3"
coroutinesVersion = "1.2.1" coroutinesVersion = "1.2.1"
freemarkerVersion = "2.3.28" freemarkerVersion = "2.3.28"
groovyVersion = "2.5.6" groovyVersion = "2.5.7"
hsqldbVersion = "2.4.1" hsqldbVersion = "2.4.1"
jackson2Version = "2.9.8" jackson2Version = "2.9.8"
jettyVersion = "9.4.18.v20190429" jettyVersion = "9.4.18.v20190429"

12
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java

@ -409,10 +409,13 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
} }
/** /**
* Return the class of the wrapped bean, if already resolved. * Return the class of the wrapped bean (assuming it is resolved already).
* @return the bean class, or {@code null} if none defined * @return the bean class (never {@code null})
* @throws IllegalStateException if the bean definition does not define a bean class, * @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 { public Class<?> getBeanClass() throws IllegalStateException {
Object beanClassObject = this.beanClass; Object beanClassObject = this.beanClass;
@ -428,6 +431,9 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/** /**
* Return whether this definition specifies a bean class. * Return whether this definition specifies a bean class.
* @see #getBeanClass()
* @see #setBeanClass(Class)
* @see #resolveBeanClass(ClassLoader)
*/ */
public boolean hasBeanClass() { public boolean hasBeanClass() {
return (this.beanClass instanceof Class); return (this.beanClass instanceof Class);

4
spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java

@ -76,9 +76,9 @@ public abstract class AssertionErrors {
* {@link AssertionError} otherwise. * {@link AssertionError} otherwise.
* @param message a message that describes the reason for the failure * @param message a message that describes the reason for the failure
* @param object the object to check * @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); assertTrue(message, object != null);
} }

Loading…
Cancel
Save