From 0f2473a873160753c4b91b9143a6bd0692edbf92 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 28 Jul 2015 07:43:36 +0000 Subject: [PATCH] Branch for 2.3.x tree git-svn-id: https://svn.libreccm.org/ccm/trunk@3532 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/runtime/ConfigError.java | 3 +- .../xml/formatters/DateFormatter.java | 38 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/ccm-core/src/com/arsdigita/runtime/ConfigError.java b/ccm-core/src/com/arsdigita/runtime/ConfigError.java index 41c8893dc..ed8a4748c 100755 --- a/ccm-core/src/com/arsdigita/runtime/ConfigError.java +++ b/ccm-core/src/com/arsdigita/runtime/ConfigError.java @@ -33,8 +33,7 @@ import org.apache.log4j.Logger; */ public class ConfigError extends Error { - private static final Logger s_log = Logger.getLogger - (ConfigError.class); + private static final long serialVersionUID = 5224480607138738741L; /** * Constructs a new configuration error with the content diff --git a/ccm-core/src/com/arsdigita/xml/formatters/DateFormatter.java b/ccm-core/src/com/arsdigita/xml/formatters/DateFormatter.java index 304cae03b..ac5950172 100755 --- a/ccm-core/src/com/arsdigita/xml/formatters/DateFormatter.java +++ b/ccm-core/src/com/arsdigita/xml/formatters/DateFormatter.java @@ -25,34 +25,34 @@ import java.util.Date; import java.text.DateFormat; /** - * An alternate formatter for java.util.Date objects, - * outputing the date in 'medium' format. The time - * is ommitted. + * An alternate formatter for java.util.Date objects, outputing the date in + * 'medium' format. The time is ommitted. * * @author unkknown * @author Sören Bernstein */ public class DateFormatter implements Formatter { - - private static DateFormatterConfig m_config; - - public static final DateFormatterConfig getConfig() { - if (m_config == null) { - m_config = new DateFormatterConfig(); - m_config.load(); - } - return m_config; - } - + + private static DateFormatterConfig m_config; + + public static final DateFormatterConfig getConfig() { + if (m_config == null) { + m_config = new DateFormatterConfig(); + m_config.load(); + } + return m_config; + } + @Override public String format(Object value) { - Date date = (Date)value; - + Date date = (Date) value; + Locale locale = GlobalizationHelper.getNegotiatedLocale(); - DateFormat format = DateFormat.getDateInstance - (DateFormat.MEDIUM, locale); - + DateFormat format = DateFormat + .getDateInstance(DateFormat.MEDIUM, locale); + return format.format(date); } + }