Remove LfsDateTimeTest and dependency on joda-time
LfsDateTimeTest was added in change I49bffffbd when joda-time was
replaced with the Java 8 time API. The intention was to confirm that
timestamps generated with the Java 8 API were the same as the ones
generated with joda-time, to ensure backward compatibility.
It's been more than two years since that change, so we no longer
need the test. Remove it, and thus also remove the dependency on the
joda-time library.
Bug: Issue 12974
Change-Id: Iec71af19534d7df0ce7b768c0ccc772de1cb524f
diff --git a/BUILD b/BUILD
index 8eb7d2a..81ab40d 100644
--- a/BUILD
+++ b/BUILD
@@ -41,6 +41,5 @@
exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
":lfs__plugin",
"@jgit-lfs//jar",
- "@joda-time//jar",
],
)
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index fc9e606..3fa929f 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -36,10 +36,3 @@
"plugin.properties",
],
)
-
- maven_jar(
- name = "joda-time",
- testonly = 1,
- artifact = "joda-time:joda-time:2.9.9",
- sha1 = "f7b520c458572890807d143670c9b24f4de90897",
- )
diff --git a/src/test/java/com/googlesource/gerrit/plugins/lfs/LfsDateTimeTest.java b/src/test/java/com/googlesource/gerrit/plugins/lfs/LfsDateTimeTest.java
deleted file mode 100644
index e2852c5..0000000
--- a/src/test/java/com/googlesource/gerrit/plugins/lfs/LfsDateTimeTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.lfs;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import java.time.Instant;
-import org.joda.time.DateTime;
-import org.joda.time.format.ISODateTimeFormat;
-import org.junit.Test;
-
-public class LfsDateTimeTest {
- @Test
- public void format() throws Exception {
- DateTime now = DateTime.now();
- String jodaFormat = ISODateTimeFormat.dateTime().withZoneUTC().print(now);
- String javaFormat = LfsDateTime.format(Instant.ofEpochMilli(now.getMillis()));
- assertThat(javaFormat).isEqualTo(jodaFormat);
- }
-}