aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src/org
diff options
context:
space:
mode:
authorDaniel Megert <daniel_megert@ch.ibm.com>2012-02-22 21:32:43 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2012-02-25 23:37:02 +0100
commit709cd52958e9794827496ce64971a65521ad02d1 (patch)
tree98e9eaa095b7f595e22c4cc11a9df0242d0805f6 /org.eclipse.jgit.junit/src/org
parent54f23873d60f3b7f70427f5db9ff2a93229a193e (diff)
downloadjgit-709cd52958e9794827496ce64971a65521ad02d1.tar.gz
jgit-709cd52958e9794827496ce64971a65521ad02d1.zip
Let the date formatter pick the locale.
Instead of using the locale from the SystemReader we let the SystemReader create the date formats without passing the locale. Bug 368756 Change-Id: I6be9e07af804a08f3f3ac2d2d526ef594eed19e3 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src/org')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
index ae1c5d9fe8..23bf5632cc 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
@@ -47,6 +47,8 @@ package org.eclipse.jgit.junit;
import java.io.File;
import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -151,6 +153,17 @@ public class MockSystemReader extends SystemReader {
return Locale.US;
}
+ @Override
+ public SimpleDateFormat getSimpleDateFormat(String pattern) {
+ return new SimpleDateFormat(pattern, getLocale());
+ }
+
+ @Override
+ public DateFormat getDateTimeInstance(int dateStyle, int timeStyle) {
+ return DateFormat
+ .getDateTimeInstance(dateStyle, timeStyle, getLocale());
+ }
+
/**
* Assign some properties for the currently executing platform
*/