diff --git a/solr/core/src/java/org/apache/solr/schema/DateField.java b/solr/core/src/java/org/apache/solr/schema/DateField.java index e923ab87cf3..9d85a2a291c 100644 --- a/solr/core/src/java/org/apache/solr/schema/DateField.java +++ b/solr/core/src/java/org/apache/solr/schema/DateField.java @@ -256,7 +256,7 @@ public class DateField extends FieldType { * Thread safe method that can be used by subclasses to format a Date * using the Internal representation. */ - public static String formatDate(Date d) { + protected String formatDate(Date d) { return fmtThreadLocal.get().format(d); } diff --git a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java index a34f2f6ae5d..084637b383d 100644 --- a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java +++ b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java @@ -198,7 +198,7 @@ public class DateFieldTest extends LuceneTestCase { protected void assertRoundTrip(String canonicalDate) throws Exception { Date d = DateField.parseDate(canonicalDate); - String result = DateField.formatDate(d) + "Z"; + String result = DateField.formatExternal(d); assertEquals("d:" + d.getTime(), canonicalDate, result); }