diff --git a/core/src/main/java/org/springframework/plugin/core/PluginRegistrySupport.java b/core/src/main/java/org/springframework/plugin/core/PluginRegistrySupport.java index 0643348..d350605 100644 --- a/core/src/main/java/org/springframework/plugin/core/PluginRegistrySupport.java +++ b/core/src/main/java/org/springframework/plugin/core/PluginRegistrySupport.java @@ -40,7 +40,7 @@ public abstract class PluginRegistrySupport, S> implements P @SuppressWarnings("unchecked") public PluginRegistrySupport(List plugins) { - Assert.notNull(plugins); + Assert.notNull(plugins, "Plugins must not be null!"); this.plugins = plugins == null ? new ArrayList() : (List) plugins; this.initialized = false; @@ -72,7 +72,7 @@ public abstract class PluginRegistrySupport, S> implements P */ protected synchronized List initialize(List plugins) { - Assert.notNull(plugins); + Assert.notNull(plugins, "Plugins must not be null!"); List result = new ArrayList(); for (T plugin : this.plugins) { diff --git a/core/src/main/java/org/springframework/plugin/core/support/AbstractTypeAwareSupport.java b/core/src/main/java/org/springframework/plugin/core/support/AbstractTypeAwareSupport.java index 8d3ef7b..9c7a9d7 100644 --- a/core/src/main/java/org/springframework/plugin/core/support/AbstractTypeAwareSupport.java +++ b/core/src/main/java/org/springframework/plugin/core/support/AbstractTypeAwareSupport.java @@ -38,8 +38,8 @@ import org.springframework.util.Assert; * * @author Oliver Gierke */ -public abstract class AbstractTypeAwareSupport implements ApplicationContextAware, - ApplicationListener, InitializingBean { +public abstract class AbstractTypeAwareSupport + implements ApplicationContextAware, ApplicationListener, InitializingBean { private ApplicationContext context; private Class type; @@ -132,8 +132,8 @@ public abstract class AbstractTypeAwareSupport implements ApplicationContextA public BeansOfTypeTargetSource(ListableBeanFactory context, Class type, boolean eagerInit, Collection> exclusions) { - Assert.notNull(context); - Assert.notNull(type); + Assert.notNull(context, "ListableBeanFactory must not be null!"); + Assert.notNull(type, "Type must not be null!"); this.context = context; this.type = type; diff --git a/core/src/test/java/org/springframework/plugin/core/support/BeanListFactoryBeanUnitTest.java b/core/src/test/java/org/springframework/plugin/core/support/BeanListFactoryBeanUnitTest.java index 93b2cb4..4725517 100644 --- a/core/src/test/java/org/springframework/plugin/core/support/BeanListFactoryBeanUnitTest.java +++ b/core/src/test/java/org/springframework/plugin/core/support/BeanListFactoryBeanUnitTest.java @@ -39,8 +39,7 @@ public class BeanListFactoryBeanUnitTest { BeanListFactoryBean factory; - @Mock - ApplicationContext context; + @Mock ApplicationContext context; @Before public void setUp() { @@ -52,6 +51,7 @@ public class BeanListFactoryBeanUnitTest { } @Test + @SuppressWarnings({ "rawtypes", "unchecked" }) public void regardsOrderOfBeans() throws Exception { // They shall be switched in the result. diff --git a/pom.xml b/pom.xml index a1e7a86..bfa4d68 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ Pivotal Software, Inc. http://www.spring.io - 2008-2016 + 2008-2017 https://github.com/spring-projects/spring-plugin @@ -44,8 +44,8 @@ - 4.3.3.BUILD-SNAPSHOT - 1.7.21 + 4.3.6.RELEASE + 1.7.22 @@ -62,6 +62,36 @@ + + + spring5 + + 5.0.0.M3 + + + + spring-libs-milestone + https://repo.spring.io/libs-milestone + + false + + + + + + spring5-next + + 5.0.0.BUILD-SNAPSHOT + + + + spring-libs-snapshot + https://repo.spring.io/libs-snapshot + + + + + @@ -197,10 +227,10 @@ - spring-libs-snapshot - https://repo.spring.io/libs-snapshot + spring-libs-release + https://repo.spring.io/libs-release - true + false