From 66cd7b58fb37d65f77004b43b1bc8feb0ce89e75 Mon Sep 17 00:00:00 2001 From: Gabriel Belingueres Date: Sun, 3 Apr 2022 19:37:30 -0300 Subject: [PATCH] Fix MNG-828 * Make datetime parsing Locale independent. --- .../maven/it/MavenITmng0828PluginConfigValuesInDebugTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0828PluginConfigValuesInDebugTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0828PluginConfigValuesInDebugTest.java index 0d93426762..a1eeec61c0 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0828PluginConfigValuesInDebugTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0828PluginConfigValuesInDebugTest.java @@ -22,6 +22,7 @@ package org.apache.maven.it; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; import org.apache.maven.it.util.ResourceExtractor; import org.apache.maven.shared.utils.io.FileUtils; @@ -71,7 +72,7 @@ public class MavenITmng0828PluginConfigValuesInDebugTest checkLog( log, "[DEBUG] (f) byteParam = 42" ); checkLog( log, "[DEBUG] (f) characterParam = X" ); - Date date = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.S a" ).parse( "2008-11-09 11:59:03.0 AM" ); + Date date = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.S a", Locale.US ).parse( "2008-11-09 11:59:03.0 AM" ); checkLog( log, "[DEBUG] (f) dateParam = " + date ); checkLog( log, "[DEBUG] (f) defaultParam = maven-core-it" );