Browse Source

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>
stable-5.7
Matthias Sohn 5 years ago
parent
commit
2f3258cc28
  1. 6
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java
  2. 3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
  3. 1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java

6
org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java → 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 {

3
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;

1
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;

Loading…
Cancel
Save