diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2011-10-23 22:53:17 +0200 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2011-10-23 22:53:17 +0200 |
commit | 63bb6ff06c736809a9d89fb2b47cada89ef13f76 (patch) | |
tree | cfc36eb75658e58451f7c0af419760c8753103e4 /org.eclipse.jgit/src | |
parent | 3a4fa527231622c7e0703ea45474fc09343ae93e (diff) | |
download | jgit-63bb6ff06c736809a9d89fb2b47cada89ef13f76.tar.gz jgit-63bb6ff06c736809a9d89fb2b47cada89ef13f76.zip |
Fix compatibilty breakage for SystemReader
Introducing a new abstract method is not nice when one
expects other to subclass them. Create default implementations
so old code that implements SystemReader does not break.
The default methods just delegate to the JVM.
Change-Id: I42cdfdcb6b29f7203697a23833dca85185b0b9b3
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java | 19 |
1 files changed, 8 insertions, 11 deletions
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 595691573c..3afd9e5675 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java @@ -121,15 +121,6 @@ public abstract class SystemReader { public int getTimezone(long when) { return getTimeZone().getOffset(when) / (60 * 1000); } - - public TimeZone getTimeZone() { - return TimeZone.getDefault(); - } - - @Override - public Locale getLocale() { - return Locale.getDefault(); - } }; /** @return the live instance to read system properties. */ @@ -200,11 +191,17 @@ public abstract class SystemReader { /** * @return system time zone, possibly mocked for testing + * @since 1.2 */ - public abstract TimeZone getTimeZone(); + public TimeZone getTimeZone() { + return TimeZone.getDefault(); + } /** * @return the locale to use + * @since 1.2 */ - public abstract Locale getLocale(); + public Locale getLocale() { + return Locale.getDefault(); + } } |