Skip to content

Commit

Permalink
Upgrade to SnakeYaml 1.31
Browse files Browse the repository at this point in the history
Closes gh-32221
  • Loading branch information
bclozel committed Sep 5, 2022
1 parent aadfefa commit 0789dd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spring-boot-project/spring-boot-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ bom {
]
}
}
library("SnakeYAML", "1.30") {
library("SnakeYAML", "1.31") {
group("org.yaml") {
modules = [
"snakeyaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

}
Expand Down

0 comments on commit 0789dd0

Please sign in to comment.