Skip to content

Commit

Permalink
upgrade snakeyaml
Browse files Browse the repository at this point in the history
(cherry picked from commit cef18af)
  • Loading branch information
GIlca authored and pintea-eugen committed Mar 28, 2023
1 parent 0c747d5 commit 8a9fc09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Scope;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.inspector.TrustedTagInspector;
import org.yaml.snakeyaml.introspector.BeanAccess;
import org.yaml.snakeyaml.introspector.Property;
import org.yaml.snakeyaml.introspector.PropertyUtils;
Expand Down Expand Up @@ -458,7 +460,7 @@ public List<Transformer> transformers() {
}

private Constructor getConstructor() {
Constructor constructor = new Constructor(ParsedSlang.class);
Constructor constructor = new Constructor(ParsedSlang.class, new LoaderOptions());
constructor.setPropertyUtils(new PropertyUtils() {
@Override
public Property getProperty(Class<? extends Object> type, String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ public void testKeyNotStringd() throws Exception {

RuntimeException exception = assertThrows(RuntimeException.class, () ->
slang.loadSystemProperties(SlangSource.fromFile(propertiesFileUri)));
assertTrue(exception.getMessage().contains("Artifact {flow.var3_sensitive} has invalid value"));
assertTrue(exception.getMessage().contains("Value cannot be cast to Serializable"));
assertTrue(exception.getMessage().contains("Global tag is not allowed"));
}

private void testExecutable(
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.32</version>
<version>2.0</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 8a9fc09

Please sign in to comment.