Remove usage of Assert.notNull(Object)

This commit updates the Spring Boot codebase to adapt to the removal of
`Assert.notNull(Object)` in SPR-15196.

See gh-8140
This commit is contained in:
Brian Clozel 2017-01-31 00:46:40 +01:00
parent 29dc6a973c
commit 7f39d5a865
4 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ public class StatsdMetricWriter implements MetricWriter, Closeable {
* @param client StatsD client to write metrics with
*/
public StatsdMetricWriter(StatsDClient client) {
Assert.notNull(client);
Assert.notNull(client, "Client must not be null");
this.client = client;
}

View File

@ -580,7 +580,7 @@ public class ConditionalOnMissingBeanTests {
public static class ExampleFactoryBean implements FactoryBean<ExampleBean> {
public ExampleFactoryBean(String value) {
Assert.state(!value.contains("$"));
Assert.state(!value.contains("$"), "value should not contain '$'");
}
@Override
@ -603,7 +603,7 @@ public class ConditionalOnMissingBeanTests {
public static class NonspecificFactoryBean implements FactoryBean<Object> {
public NonspecificFactoryBean(String value) {
Assert.state(!value.contains("$"));
Assert.state(!value.contains("$"), "value should not contain '$'");
}
@Override

View File

@ -89,7 +89,7 @@ public class PropertiesConfigurationFactory<T>
* @see #PropertiesConfigurationFactory(Class)
*/
public PropertiesConfigurationFactory(T target) {
Assert.notNull(target);
Assert.notNull(target, "Target object must not be null");
this.target = target;
}
@ -100,7 +100,7 @@ public class PropertiesConfigurationFactory<T>
*/
@SuppressWarnings("unchecked")
public PropertiesConfigurationFactory(Class<?> type) {
Assert.notNull(type);
Assert.notNull(type, "Target type must not be null");
this.target = (T) BeanUtils.instantiateClass(type);
}

View File

@ -73,7 +73,7 @@ public class YamlConfigurationFactory<T>
* @param type the root type
*/
public YamlConfigurationFactory(Class<?> type) {
Assert.notNull(type);
Assert.notNull(type, "Root type must not be null");
this.type = type;
}