Inline duplicate constants.
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index d7752a5..e548d2c 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -54,7 +54,7 @@
public class FastDateParserTest {
private enum Expected1806 {
- India(INDIA, "+05", "+0530", "+05:30", true), Greenwich(GMT, "Z", "Z", "Z", false),
+ India(INDIA, "+05", "+0530", "+05:30", true), Greenwich(TimeZones.GMT, "Z", "Z", "Z", false),
NewYork(NEW_YORK, "-05", "-0500", "-05:00", false);
final TimeZone zone;
@@ -90,7 +90,6 @@
private static final TimeZone REYKJAVIK = TimeZone.getTimeZone("Atlantic/Reykjavik");
private static final TimeZone NEW_YORK = TimeZone.getTimeZone("America/New_York");
- static final TimeZone GMT = TimeZones.GMT;
private static final TimeZone INDIA = TimeZone.getTimeZone("Asia/Calcutta");
private static final Locale SWEDEN = new Locale("sv", "SE");
@@ -320,7 +319,7 @@
@Test
public void testJpLocales() throws ParseException {
- final Calendar cal = Calendar.getInstance(GMT);
+ final Calendar cal = Calendar.getInstance(TimeZones.GMT);
cal.clear();
cal.set(2003, Calendar.FEBRUARY, 10);
cal.set(Calendar.ERA, GregorianCalendar.BC);
@@ -376,11 +375,11 @@
@ParameterizedTest
@MethodSource(DATE_PARSER_PARAMETERS)
public void testLang1380(final TriFunction<String, TimeZone, Locale, DateParser> dpProvider) throws ParseException {
- final Calendar expected = Calendar.getInstance(GMT, Locale.FRANCE);
+ final Calendar expected = Calendar.getInstance(TimeZones.GMT, Locale.FRANCE);
expected.clear();
expected.set(2014, Calendar.APRIL, 14);
- final DateParser fdp = getInstance(dpProvider, "dd MMM yyyy", GMT, Locale.FRANCE);
+ final DateParser fdp = getInstance(dpProvider, "dd MMM yyyy", TimeZones.GMT, Locale.FRANCE);
assertEquals(expected.getTime(), fdp.parse("14 avril 2014"));
assertEquals(expected.getTime(), fdp.parse("14 avr. 2014"));
assertEquals(expected.getTime(), fdp.parse("14 avr 2014"));
@@ -400,7 +399,7 @@
@Test
public void testLang538() throws ParseException {
- final DateParser parser = getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", GMT);
+ final DateParser parser = getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", TimeZones.GMT);
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT-8"));
cal.clear();
@@ -514,7 +513,7 @@
public void testParses() throws Exception {
for (final String format : new String[] {LONG_FORMAT, SHORT_FORMAT}) {
for (final Locale locale : Locale.getAvailableLocales()) {
- for (final TimeZone timeZone : new TimeZone[] {NEW_YORK, REYKJAVIK, GMT}) {
+ for (final TimeZone timeZone : new TimeZone[] {NEW_YORK, REYKJAVIK, TimeZones.GMT}) {
for (final int year : new int[] {2003, 1940, 1868, 1867, 1, -1, -1940}) {
final Calendar cal = getEraStart(year, timeZone, locale);
final Date centuryStart = cal.getTime();
@@ -691,7 +690,7 @@
for (final Locale locale : Locale.getAvailableLocales()) {
final FastDateParser fdp = new FastDateParser("yyyy/MM/dd z", TimeZone.getDefault(), locale);
- for (final TimeZone timeZone : new TimeZone[] {NEW_YORK, REYKJAVIK, GMT}) {
+ for (final TimeZone timeZone : new TimeZone[] {NEW_YORK, REYKJAVIK, TimeZones.GMT}) {
final Calendar cal = Calendar.getInstance(timeZone, locale);
cal.clear();
cal.set(Calendar.YEAR, 2000);
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
index 6ef333a..772973e 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
@@ -43,7 +43,7 @@
public class FastDatePrinterTest {
private enum Expected1806 {
- India(INDIA, "+05", "+0530", "+05:30"), Greenwich(GMT, "Z", "Z", "Z"), NewYork(
+ India(INDIA, "+05", "+0530", "+05:30"), Greenwich(TimeZones.GMT, "Z", "Z", "Z"), NewYork(
NEW_YORK, "-05", "-0500", "-05:00");
final TimeZone zone;
@@ -60,7 +60,6 @@
}
private static final String YYYY_MM_DD = "yyyy/MM/dd";
private static final TimeZone NEW_YORK = TimeZone.getTimeZone("America/New_York");
- private static final TimeZone GMT = TimeZones.GMT;
private static final TimeZone INDIA = TimeZone.getTimeZone("Asia/Calcutta");
private static final Locale SWEDEN = new Locale("sv", "SE");
diff --git a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
index 265ca00..9ac105a 100644
--- a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
@@ -67,7 +67,7 @@
private void testLocales(final TriFunction<String, TimeZone, Locale, DateParser> dbProvider, final String format,
final boolean eraBC) throws Exception {
- final Calendar cal = Calendar.getInstance(FastDateParserTest.GMT);
+ final Calendar cal = Calendar.getInstance(TimeZones.GMT);
cal.clear();
cal.set(2003, Calendar.FEBRUARY, 10);
if (eraBC) {
@@ -144,7 +144,7 @@
}
private void testSingleLocale(final Locale locale) throws ParseException {
- final Calendar cal = Calendar.getInstance(FastDateParserTest.GMT);
+ final Calendar cal = Calendar.getInstance(TimeZones.GMT);
cal.clear();
cal.set(2003, Calendar.FEBRUARY, 10);
final SimpleDateFormat sdf = new SimpleDateFormat(FastDateParserTest.LONG_FORMAT, locale);