From 63bb6ff06c736809a9d89fb2b47cada89ef13f76 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 23 Oct 2011 22:53:17 +0200 Subject: 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 --- .../src/org/eclipse/jgit/util/SystemReader.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'org.eclipse.jgit/src') 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(); + } } -- cgit v1.2.3