diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 98bc0debe988..e8c31e039d6b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1382,7 +1382,7 @@ bom { ] } } - library("SnakeYAML", "1.30") { + library("SnakeYAML", "1.31") { group("org.yaml") { modules = [ "snakeyaml" diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedYamlLoader.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedYamlLoader.java index a4dc11746a76..f9b194078589 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedYamlLoader.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedYamlLoader.java @@ -75,7 +75,7 @@ private Yaml createYaml(LoaderOptions loaderOptions) { BaseConstructor constructor = new OriginTrackingConstructor(loaderOptions); Representer representer = new Representer(); DumperOptions dumperOptions = new DumperOptions(); - LimitedResolver resolver = new LimitedResolver(); + NoTimestampResolver resolver = new NoTimestampResolver(); return new Yaml(constructor, representer, dumperOptions, loaderOptions, resolver); } @@ -167,14 +167,14 @@ private static Node get(Node node) { /** * {@link Resolver} that limits {@link Tag#TIMESTAMP} tags. */ - private static class LimitedResolver extends Resolver { + private static class NoTimestampResolver extends Resolver { @Override - public void addImplicitResolver(Tag tag, Pattern regexp, String first) { + public void addImplicitResolver(Tag tag, Pattern regexp, String first, int limit) { if (tag == Tag.TIMESTAMP) { return; } - super.addImplicitResolver(tag, regexp, first); + super.addImplicitResolver(tag, regexp, first, limit); } }