Skip to content

fix: compatible with snakeyaml-2.x #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Apollo Java 2.2.0
[refactor(apollo-client): Optimize the exception message when failing to retrieve configuration information.](https://github.com/apolloconfig/apollo-java/pull/22)
[Add JUnit5 extension support for apollo mock server.](https://github.com/apolloconfig/apollo-java/pull/25)
[Support concurrent loading of Config for different namespaces.](https://github.com/apolloconfig/apollo-java/pull/31)
[Fix snakeyaml 2.x compatibility issues](https://github.com/apolloconfig/apollo-java/pull/35)
------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo-java/milestone/2?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public void process(Properties properties, Map<String, Object> map) {
private Yaml createYaml() {
LoaderOptions loadingConfig = new LoaderOptions();
loadingConfig.setAllowDuplicateKeys(false);
return new Yaml(new SafeConstructor(), new Representer(), new DumperOptions(), loadingConfig);
DumperOptions dumperOptions = new DumperOptions();
return new Yaml(new SafeConstructor(loadingConfig),
new Representer(dumperOptions), dumperOptions, loadingConfig);
}

private boolean process(MatchCallback callback, Yaml yaml, String content) {
Expand Down