Remove use of spring-core's Assert from PropertiesLauncher

Fixes gh-23474
pull/23562/head
Andy Wilkinson 4 years ago
parent 325194093c
commit e74f777971

@ -19,12 +19,7 @@
<developerConnection>${git.developerConnection}</developerConnection> <developerConnection>${git.developerConnection}</developerConnection>
</scm> </scm>
<dependencies> <dependencies>
<!-- Optional (must never have compile/runtime time dependencies) --> <!-- Mmust never have compile/runtime time dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<optional>true</optional>
</dependency>
<!-- Test --> <!-- Test -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -43,7 +43,6 @@ import org.springframework.boot.loader.archive.Archive.EntryFilter;
import org.springframework.boot.loader.archive.ExplodedArchive; import org.springframework.boot.loader.archive.ExplodedArchive;
import org.springframework.boot.loader.archive.JarFileArchive; import org.springframework.boot.loader.archive.JarFileArchive;
import org.springframework.boot.loader.util.SystemPropertyUtils; import org.springframework.boot.loader.util.SystemPropertyUtils;
import org.springframework.util.Assert;
/** /**
* {@link Launcher} for archives with user-configured classpath and main class via a * {@link Launcher} for archives with user-configured classpath and main class via a
@ -370,7 +369,9 @@ public class PropertiesLauncher extends Launcher {
if (classLoader == null) { if (classLoader == null) {
classLoader = newClassLoader(type, NO_PARAMS); classLoader = newClassLoader(type, NO_PARAMS);
} }
Assert.notNull(classLoader, "Unable to create class loader for " + className); if (classLoader == null) {
throw new IllegalArgumentException("Unable to create class loader for " + className);
}
return classLoader; return classLoader;
} }

Loading…
Cancel
Save