Skip to content

Commit a5e95ef

Browse files
committed
Merge branch '2.4.x' into 2.5.x
Closes gh-27419
2 parents c2819d6 + b5587b0 commit a5e95ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/YamlPropertySourceLoader.java

Lines changed: 2 additions & 2 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-2021 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,7 @@ public String[] getFileExtensions() {
4343

4444
@Override
4545
public List<PropertySource<?>> load(String name, Resource resource) throws IOException {
46-
if (!ClassUtils.isPresent("org.yaml.snakeyaml.Yaml", null)) {
46+
if (!ClassUtils.isPresent("org.yaml.snakeyaml.Yaml", getClass().getClassLoader())) {
4747
throw new IllegalStateException(
4848
"Attempted to load " + name + " but snakeyaml was not found on the classpath");
4949
}

0 commit comments

Comments
 (0)