diff --git a/core/src/main/java/cucumber/api/HookType.java b/core/src/main/java/cucumber/api/HookType.java index acd0923678..5d1d2a32c3 100644 --- a/core/src/main/java/cucumber/api/HookType.java +++ b/core/src/main/java/cucumber/api/HookType.java @@ -1,10 +1,12 @@ package cucumber.api; +import static java.util.Locale.ROOT; + public enum HookType { Before, After, BeforeStep, AfterStep; @Override public String toString() { - return super.toString().toLowerCase(); + return super.toString().toLowerCase(ROOT); } } diff --git a/core/src/main/java/cucumber/api/Result.java b/core/src/main/java/cucumber/api/Result.java index 7c65ac36c7..de48752b0f 100644 --- a/core/src/main/java/cucumber/api/Result.java +++ b/core/src/main/java/cucumber/api/Result.java @@ -5,6 +5,7 @@ import java.util.Comparator; import java.util.Objects; +import static java.util.Locale.ROOT; import static java.util.Objects.requireNonNull; public final class Result { @@ -30,15 +31,15 @@ public enum Type { FAILED; public static Type fromLowerCaseName(String lowerCaseName) { - return valueOf(lowerCaseName.toUpperCase()); + return valueOf(lowerCaseName.toUpperCase(ROOT)); } public String lowerCaseName() { - return name().toLowerCase(); + return name().toLowerCase(ROOT); } public String firstLetterCapitalizedName() { - return name().substring(0, 1) + name().substring(1).toLowerCase(); + return name().substring(0, 1) + name().substring(1).toLowerCase(ROOT); } diff --git a/core/src/main/java/cucumber/runtime/Env.java b/core/src/main/java/cucumber/runtime/Env.java index 60afa48225..81bea903ec 100644 --- a/core/src/main/java/cucumber/runtime/Env.java +++ b/core/src/main/java/cucumber/runtime/Env.java @@ -6,6 +6,8 @@ import java.util.Properties; import java.util.ResourceBundle; +import static java.util.Locale.ROOT; + /** * Looks up values in the following order: *