Skip to content

Commit 3182b86

Browse files
authored
Catch NCDF instead of using Class.forName
1 parent 438d2f7 commit 3182b86

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

avaje-config/src/main/java/io/avaje/config/Parsers.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ final class Parsers {
2525
private void initYamlParser() {
2626
YamlLoader yamlLoader;
2727
try {
28-
Class.forName("org.yaml.snakeyaml.Yaml");
2928
yamlLoader = new YamlLoaderSnake();
30-
} catch (ClassNotFoundException e) {
29+
} catch (NoClassDefFoundError e) {
3130
yamlLoader = new YamlLoaderSimple();
3231
}
3332
parserMap.put("yml", yamlLoader);

0 commit comments

Comments
 (0)