From adbcbc791b854071f0d2ca60a85832a025982ef8 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 21 May 2015 16:15:06 -0700 Subject: [PATCH] Expose Sets helper to tests outside org.eclipse.jgit.api A later patch will make use of this class in a org.eclipse.jgit.lib test. Change-Id: I2b268e6a5dbf12174201f45259f9f007686708d2 Signed-off-by: Jonathan Nieder --- org.eclipse.jgit.test/pom.xml | 1 + .../eclipse/jgit/api => src/org/eclipse/jgit/lib}/Sets.java | 6 +++--- .../tst/org/eclipse/jgit/api/MergeCommandTest.java | 1 + .../tst/org/eclipse/jgit/api/StatusCommandTest.java | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) rename org.eclipse.jgit.test/{tst/org/eclipse/jgit/api => src/org/eclipse/jgit/lib}/Sets.java (95%) diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 0e1419a16..da700939c 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -102,6 +102,7 @@ + src/ tst/ diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/Sets.java b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java similarity index 95% rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/api/Sets.java rename to org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java index edfab551a..731685731 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/Sets.java +++ b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java @@ -41,13 +41,13 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.eclipse.jgit.api; +package org.eclipse.jgit.lib; import java.util.HashSet; import java.util.Set; -class Sets { - static Set of(T... elements) { +public class Sets { + public static Set of(T... elements) { Set ret = new HashSet(); for (T element : elements) ret.add(element); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java index 761aafa3f..0c0c6e5b5 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java @@ -62,6 +62,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryState; +import org.eclipse.jgit.lib.Sets; import org.eclipse.jgit.merge.MergeStrategy; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; import org.eclipse.jgit.revwalk.RevCommit; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java index 47650232b..c70604ecb 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java @@ -53,6 +53,7 @@ import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.NoFilepatternException; import org.eclipse.jgit.errors.NoWorkTreeException; import org.eclipse.jgit.junit.RepositoryTestCase; +import org.eclipse.jgit.lib.Sets; import org.junit.Test; public class StatusCommandTest extends RepositoryTestCase {