Fix MNG-828

* Make datetime parsing Locale independent.
This commit is contained in:
Gabriel Belingueres 2022-04-03 19:37:30 -03:00 committed by Slawomir Jaranowski
parent 2f4fd12d41
commit 66cd7b58fb
1 changed files with 2 additions and 1 deletions

View File

@ -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" );