Skip to content

Commit

Permalink
Deprecated SnakeYAML methods (#3079)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcMil authored May 27, 2023
1 parent e53869c commit 636b1a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.yaml.snakeyaml.constructor.AbstractConstruct;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.error.YAMLException;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.nodes.Node;
import org.yaml.snakeyaml.nodes.ScalarNode;
import org.yaml.snakeyaml.nodes.Tag;
Expand All @@ -29,6 +30,7 @@ public class ClassSafeConstructor extends Constructor {
protected final List<Class<?>> allowableClasses = new ArrayList<>();

public ClassSafeConstructor() {
super(new LoaderOptions());
this.yamlConstructors.put(Tag.STR, new ConstructStringEx());

this.allowableClasses.add(MetaInfo.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
*/
package brut.androlib.meta;

import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.nodes.Node;
import org.yaml.snakeyaml.representer.Representer;

public class EscapedStringRepresenter extends Representer {
public EscapedStringRepresenter() {
super(new DumperOptions());
RepresentStringEx representStringEx = new RepresentStringEx();
multiRepresenters.put(String.class, representStringEx);
representers.put(String.class, representStringEx);
Expand Down

0 comments on commit 636b1a1

Please sign in to comment.