Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2011-10-09 16:43:16 +0000
committerRobin Rosenberg2011-10-20 21:49:52 +0000
commit3a4fa527231622c7e0703ea45474fc09343ae93e (patch)
tree1477d3314a6a67fbab2c765f89bd5145034d50ef
parent06b183f9b7f902d3e81bea9aa909a044f76d79fb (diff)
downloadjgit-3a4fa527231622c7e0703ea45474fc09343ae93e.tar.gz
jgit-3a4fa527231622c7e0703ea45474fc09343ae93e.tar.xz
jgit-3a4fa527231622c7e0703ea45474fc09343ae93e.zip
Add locale to the properties manageable by SystemReader
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java11
2 files changed, 17 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 3daaea90c5..b9bc25857a 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
@@ -48,6 +48,7 @@ package org.eclipse.jgit.junit;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
@@ -144,4 +145,9 @@ public class MockSystemReader extends SystemReader {
public TimeZone getTimeZone() {
return TimeZone.getTimeZone("GMT-03:30");
}
+
+ @Override
+ public Locale getLocale() {
+ return Locale.US;
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
index 0b72ade50b..595691573c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
@@ -48,6 +48,7 @@ package org.eclipse.jgit.util;
import java.io.File;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.Locale;
import java.util.TimeZone;
import org.eclipse.jgit.lib.Config;
@@ -124,6 +125,11 @@ public abstract class SystemReader {
public TimeZone getTimeZone() {
return TimeZone.getDefault();
}
+
+ @Override
+ public Locale getLocale() {
+ return Locale.getDefault();
+ }
};
/** @return the live instance to read system properties. */
@@ -196,4 +202,9 @@ public abstract class SystemReader {
* @return system time zone, possibly mocked for testing
*/
public abstract TimeZone getTimeZone();
+
+ /**
+ * @return the locale to use
+ */
+ public abstract Locale getLocale();
}

Back to the top