diff options
-rw-r--r-- | tests/features198/java17/SwitchPatternAspect.aj | 3 | ||||
-rw-r--r-- | tests/features198/java17/SwitchPatternOK.java | 3 | ||||
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/features198/java17/SwitchPatternAspect.aj b/tests/features198/java17/SwitchPatternAspect.aj index 5a3eeeb30..bf19b8468 100644 --- a/tests/features198/java17/SwitchPatternAspect.aj +++ b/tests/features198/java17/SwitchPatternAspect.aj @@ -1,4 +1,5 @@ import java.util.List; +import java.util.Locale; aspect SwitchPatternAspect { Object around(Object o) : execution(* doSomethingWithObject(*)) && args(o) { @@ -6,7 +7,7 @@ aspect SwitchPatternAspect { case null -> "null"; case Integer i -> String.format("int %d", i); case Long l -> String.format("long %d", l); - case Double d -> String.format("double %f", d); + case Double d -> String.format(Locale.ENGLISH, "double %f", d); case String s -> String.format("String %s", s); default -> o.toString(); }); diff --git a/tests/features198/java17/SwitchPatternOK.java b/tests/features198/java17/SwitchPatternOK.java index 26c1cf755..586dfe020 100644 --- a/tests/features198/java17/SwitchPatternOK.java +++ b/tests/features198/java17/SwitchPatternOK.java @@ -1,4 +1,5 @@ import java.util.List; +import java.util.Locale; /** * Inspired by examples in https://openjdk.java.net/jeps/406 @@ -26,7 +27,7 @@ public class SwitchPatternOK { case null -> "null"; case Integer i -> String.format("int %d", i); case Long l -> String.format("long %d", l); - case Double d -> String.format("double %f", d); + case Double d -> String.format(Locale.ENGLISH, "double %f", d); case String s -> String.format("String %s", s); default -> o.toString(); }; diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml index 9937413a9..c182b58b9 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml @@ -42,7 +42,7 @@ <line text="null" /> <line text="int 123" /> <line text="long 999" /> - <line text="double 12,340000" /> + <line text="double 12.340000" /> <line text="String foo" /> <line text="[123, foo, 999, 12.34]" /> <line text="Non-circle" /> @@ -63,7 +63,7 @@ <line text="null" /> <line text="int 123" /> <line text="long 999" /> - <line text="double 12,340000" /> + <line text="double 12.340000" /> <line text="String foo" /> <line text="[123, foo, 999, 12.34]" /> <line text="Non-circle" /> |