Commit d8982aa5 authored by Ryan VanderMeulen's avatar Ryan VanderMeulen
Browse files

Bug 1834576 - Update snakeyaml to version 2.0. r=geckoview-reviewers,calu

Added LoaderOptions because the deprecated Constructor we were
using was removed upstream.

Depends on D178822

Differential Revision: https://phabricator.services.mozilla.com/D178823
parent d4bc37f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ dependencies {
    implementation "androidx.legacy:legacy-support-v4:1.0.0"

    implementation "com.google.android.gms:play-services-fido:20.0.1"
    implementation "org.yaml:snakeyaml:1.33"
    implementation "org.yaml:snakeyaml:2.0"

    implementation "androidx.lifecycle:lifecycle-common:2.6.1"
    implementation "androidx.lifecycle:lifecycle-process:2.6.1"
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mozilla.gecko.annotation.ReflectionTarget;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.TypeDescription;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
@@ -51,7 +52,8 @@ public class DebugConfig {
      throw new ConfigException("Config version is only supported for SDK_INT >= 21.");
    }

    final Constructor constructor = new Constructor(DebugConfig.class);
    final LoaderOptions options = new LoaderOptions();
    final Constructor constructor = new Constructor(DebugConfig.class, options);
    final TypeDescription description = new TypeDescription(DebugConfig.class);
    description.putMapPropertyType("prefs", String.class, Object.class);
    description.putMapPropertyType("env", String.class, String.class);