From ddc27f259e0a8ef201a62b5ccb063cc5c415625b Mon Sep 17 00:00:00 2001 From: delta456 Date: Thu, 12 Sep 2024 15:23:34 +0530 Subject: [PATCH 1/2] toml: warn about upcoming change enforcing string to have quotes --- java/src/org/openqa/selenium/grid/config/TomlConfig.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/src/org/openqa/selenium/grid/config/TomlConfig.java b/java/src/org/openqa/selenium/grid/config/TomlConfig.java index 51912d626daec..5aabae2845d6e 100644 --- a/java/src/org/openqa/selenium/grid/config/TomlConfig.java +++ b/java/src/org/openqa/selenium/grid/config/TomlConfig.java @@ -31,15 +31,19 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.logging.Logger; import org.openqa.selenium.internal.Require; public class TomlConfig implements Config { private final Toml toml; + private static final Logger LOG = Logger.getLogger(TomlConfig.class.getName()); + public TomlConfig(Reader reader) { try { toml = JToml.parse(reader); + LOG.warning("Please use quotes to denote strings. Upcoming TOML parser will require this and unquoted strings will throw an error in the future"); } catch (IOException e) { throw new ConfigException("Unable to read TOML.", e); } catch (ParseException e) { From 17fb6a2a81f9b81f5cfa051fa0f7c3c008b69759 Mon Sep 17 00:00:00 2001 From: delta456 Date: Thu, 12 Sep 2024 16:12:49 +0530 Subject: [PATCH 2/2] fmt --- java/src/org/openqa/selenium/grid/config/TomlConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/src/org/openqa/selenium/grid/config/TomlConfig.java b/java/src/org/openqa/selenium/grid/config/TomlConfig.java index 5aabae2845d6e..cc6f2daa84608 100644 --- a/java/src/org/openqa/selenium/grid/config/TomlConfig.java +++ b/java/src/org/openqa/selenium/grid/config/TomlConfig.java @@ -39,11 +39,12 @@ public class TomlConfig implements Config { private final Toml toml; private static final Logger LOG = Logger.getLogger(TomlConfig.class.getName()); - public TomlConfig(Reader reader) { try { toml = JToml.parse(reader); - LOG.warning("Please use quotes to denote strings. Upcoming TOML parser will require this and unquoted strings will throw an error in the future"); + LOG.warning( + "Please use quotes to denote strings. Upcoming TOML parser will require this and unquoted" + + " strings will throw an error in the future"); } catch (IOException e) { throw new ConfigException("Unable to read TOML.", e); } catch (ParseException e) {