Skip to content

Commit

Permalink
Merge pull request #31594 from gsmet/snakeyaml-2.0
Browse files Browse the repository at this point in the history
Upgrade to SnakeYaml 2.0
  • Loading branch information
gsmet authored Mar 14, 2023
2 parents c6c19fc + 8edf2c4 commit d3f527c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<flyway.version>9.15.2</flyway.version>
<yasson.version>3.0.2</yasson.version>
<liquibase.version>4.20.0</liquibase.version>
<snakeyaml.version>1.33</snakeyaml.version>
<snakeyaml.version>2.0</snakeyaml.version>
<osgi.version>6.0.0</osgi.version>
<mongo-client.version>4.9.0</mongo-client.version>
<mongo-crypt.version>1.7.1</mongo-crypt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.jboss.forge.roaster.model.JavaDocCapable;
import org.jboss.forge.roaster.model.source.FieldSource;
import org.jboss.forge.roaster.model.source.JavaClassSource;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;

Expand Down Expand Up @@ -154,7 +155,7 @@ private Path findPom(Path path) {

private Map<String, String> extractNames(Path root, Iterable<String> extensionDirs) throws IOException {
Map<String, String> names = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
Yaml yaml = new Yaml(new SafeConstructor());
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
for (String extension : extensionDirs) {
Path yamlPath = root
.resolve("extensions/" + extension + "/runtime/src/main/resources/META-INF/quarkus-extension.yaml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;

Expand Down Expand Up @@ -75,7 +76,7 @@ private void initLazyState() {
synchronized (extensions) {
if (extensions.isEmpty()) {
try {
final Yaml yaml = new Yaml(new SafeConstructor());
final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
ClassPathUtils.consumeAsPaths("/META-INF/quarkus-extension.yaml", p -> {
try {
final String desc;
Expand Down

0 comments on commit d3f527c

Please sign in to comment.