Skip to content
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

upgrade snakeyaml to 2.0 #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Versions {
const val spotless = "5.11.1"
const val taskTree = "1.5"
const val toml4j = "0.7.2"
const val yaml = "1.28"
const val yaml = "2.0"

// Since 1.8, the minimum supported runtime version is JDK 11.
const val googleJavaFormat = "1.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.uchuhimo.konf.source.Provider
import com.uchuhimo.konf.source.RegisterExtension
import com.uchuhimo.konf.source.Source
import com.uchuhimo.konf.source.asSource
import org.yaml.snakeyaml.LoaderOptions
import org.yaml.snakeyaml.Yaml
import org.yaml.snakeyaml.constructor.AbstractConstruct
import org.yaml.snakeyaml.constructor.SafeConstructor
Expand Down Expand Up @@ -60,7 +61,7 @@ object YamlProvider : Provider {
fun get() = this
}

private class YamlConstructor : SafeConstructor() {
private class YamlConstructor : SafeConstructor(LoaderOptions()) {
init {
yamlConstructors[Tag.NULL] = object : AbstractConstruct() {
override fun construct(node: Node?): Any? {
Expand Down