Skip to content

Commit e74f777

Browse files
committed
Remove use of spring-core's Assert from PropertiesLauncher
Fixes gh-23474
1 parent 3251940 commit e74f777

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

spring-boot-project/spring-boot-tools/spring-boot-loader/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919
<developerConnection>${git.developerConnection}</developerConnection>
2020
</scm>
2121
<dependencies>
22-
<!-- Optional (must never have compile/runtime time dependencies) -->
23-
<dependency>
24-
<groupId>org.springframework</groupId>
25-
<artifactId>spring-core</artifactId>
26-
<optional>true</optional>
27-
</dependency>
22+
<!-- Mmust never have compile/runtime time dependencies -->
2823
<!-- Test -->
2924
<dependency>
3025
<groupId>org.springframework.boot</groupId>

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,6 @@
4343
import org.springframework.boot.loader.archive.ExplodedArchive;
4444
import org.springframework.boot.loader.archive.JarFileArchive;
4545
import org.springframework.boot.loader.util.SystemPropertyUtils;
46-
import org.springframework.util.Assert;
4746

4847
/**
4948
* {@link Launcher} for archives with user-configured classpath and main class via a
@@ -370,7 +369,9 @@ private ClassLoader wrapWithCustomClassLoader(ClassLoader parent, String classNa
370369
if (classLoader == null) {
371370
classLoader = newClassLoader(type, NO_PARAMS);
372371
}
373-
Assert.notNull(classLoader, "Unable to create class loader for " + className);
372+
if (classLoader == null) {
373+
throw new IllegalArgumentException("Unable to create class loader for " + className);
374+
}
374375
return classLoader;
375376
}
376377

0 commit comments

Comments
 (0)