From 723d67b83ec13a4d71c79bef1d764982af5eee21 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 17 Aug 2017 23:21:22 +0100 Subject: [PATCH 1/3] Bazel: Add missing dependency in org.eclipse.jgit.http.test Change-Id: I255af794856371fdf1a1eceb6bca50a35b71b519 Signed-off-by: David Pursehouse --- org.eclipse.jgit.http.test/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/org.eclipse.jgit.http.test/BUILD b/org.eclipse.jgit.http.test/BUILD index ce2d6112f..85a22422b 100644 --- a/org.eclipse.jgit.http.test/BUILD +++ b/org.eclipse.jgit.http.test/BUILD @@ -34,6 +34,7 @@ java_library( srcs = glob(["src/**/*.java"]), deps = [ "//lib:junit", + "//lib:servlet-api", "//org.eclipse.jgit.http.server:jgit-servlet", "//org.eclipse.jgit:jgit", "//org.eclipse.jgit.junit.http:junit-http", From 904e9f8b73dfac84726163b91e6464ee54ce5625 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 17 Aug 2017 23:22:11 +0100 Subject: [PATCH 2/3] Format BUILD files with buildifier Change-Id: I5e2a286866b63a8fa2bd29cc2fe432fab2bbe0af Signed-off-by: David Pursehouse --- lib/BUILD | 6 +++--- org.eclipse.jgit.test/BUILD | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/BUILD b/lib/BUILD index 827e6b6fc..ffe66a3d8 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -115,9 +115,9 @@ java_library( testonly = 1, visibility = ["//visibility:public"], exports = [ - "@junit//jar", - "@hamcrest_core//jar", - "@hamcrest_library//jar", + "@hamcrest_core//jar", + "@hamcrest_library//jar", + "@junit//jar", ], ) diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index ae6f24223..bbda838f0 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -33,7 +33,7 @@ DATA = [ tests(glob( ["tst/**/*.java"], - exclude = HELPERS + DATA + exclude = HELPERS + DATA, )) java_library( @@ -54,8 +54,8 @@ java_import( ) genrule2( - name = 'tst_rsrc_jar', - cmd = 'o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .', - srcs = glob(['tst-rsrc/**']), - outs = ['tst_rsrc.jar',], + name = "tst_rsrc_jar", + srcs = glob(["tst-rsrc/**"]), + outs = ["tst_rsrc.jar"], + cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", ) From f79911e4a2a6766583c0d440a33d8807841bd68e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 17 Aug 2017 23:15:30 +0100 Subject: [PATCH 3/3] LongObjectIdTest: Add back self comparison test The test was removed in 4886621 to prevent a warning from error-prone. Add it back but rewrite it in a way that does not cause the warning. This reverts commit 4886621261c3b5fa2d9c75fd72d19ac186c9f970. Change-Id: Id3994e2d882a9d08bf548b7778406f8a80fbf830 Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java index e754d6f74..31ab783e2 100644 --- a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java +++ b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java @@ -291,6 +291,8 @@ public class LongObjectIdTest { "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"); assertEquals(0, id1.compareTo(LongObjectId.fromString( "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"))); + AnyLongObjectId self = id1; + assertEquals(0, id1.compareTo(self)); assertEquals(-1, id1.compareTo(LongObjectId.fromString( "1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")));