summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2020-01-09 18:06:05 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2020-01-09 18:06:05 +0100
commit2f3258cc28482d744c14caa8109cecd3316db659 (patch)
treef98e670774e8c4108a43fc9365090db51c4de0d5
parentdb019c473edcf8cc96456f8c4ac07e42a7d2eefa (diff)
downloadjgit-2f3258cc28482d744c14caa8109cecd3316db659.tar.gz
jgit-2f3258cc28482d744c14caa8109cecd3316db659.zip
Move ConnectivityChecker to fix API leak
Protected field ReceivePack.connectivityChecker is of type ConnectivityChecker which was located in internal package org.eclipse.jgit.transport and was thus leaking an internal type. In order to fix this move ConnectivityChecker to package org.eclipse.jgit.transport. Change-Id: Idc0af75502faf39f13a56157bbb6964d24720eb8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java (renamed from org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java)6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java1
3 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java
index d6efada65b..dcffe48be8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java
@@ -8,7 +8,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.transport.internal;
+package org.eclipse.jgit.transport;
import java.io.IOException;
import java.util.List;
@@ -18,12 +18,12 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevWalk;
-import org.eclipse.jgit.transport.PackParser;
-import org.eclipse.jgit.transport.ReceiveCommand;
/**
* Checks that a received pack only depends on objects which are reachable from
* a defined set of references.
+ *
+ * @since 5.7
*/
public interface ConnectivityChecker {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 0b55203f96..8ca09f8ad2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -68,11 +68,10 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.ConnectivityChecker.ConnectivityCheckInfo;
import org.eclipse.jgit.transport.PacketLineIn.InputOverLimitIOException;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser;
-import org.eclipse.jgit.transport.internal.ConnectivityChecker.ConnectivityCheckInfo;
-import org.eclipse.jgit.transport.internal.ConnectivityChecker;
import org.eclipse.jgit.transport.internal.FullConnectivityChecker;
import org.eclipse.jgit.util.io.InterruptTimer;
import org.eclipse.jgit.util.io.LimitedInputStream;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
index 4adddf0879..60d8f452ba 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
@@ -26,6 +26,7 @@ import org.eclipse.jgit.revwalk.RevFlag;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevSort;
import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.transport.ConnectivityChecker;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.ReceiveCommand.Result;