]> source.dussan.org Git - jgit.git/commitdiff
UploadPack: Remove @Deprecated classes and methods 03/1200303/1
authorIvan Frade <ifrade@google.com>
Thu, 29 Aug 2024 22:40:49 +0000 (15:40 -0700)
committerIvan Frade <ifrade@google.com>
Thu, 29 Aug 2024 22:40:49 +0000 (15:40 -0700)
The coming 7.0 release is a chance to clean up these deprecated
classes and methods.

Change-Id: I23d263c9244c1e0096eb7c96c290213c9e668a03

org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

index 9318871520839f61a607e583d5c7c926b0fc2e3e..ec51c885c683c1fdda3f7201e8c216efe0b50774 100644 (file)
@@ -30,11 +30,11 @@ import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_MULTI_ACK_D
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_NO_DONE;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_NO_PROGRESS;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_OFS_DELTA;
+import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SESSION_ID;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SHALLOW;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SIDEBAND_ALL;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SIDE_BAND;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SIDE_BAND_64K;
-import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SESSION_ID;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_THIN_PACK;
 import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_WAIT_FOR_DONE;
 import static org.eclipse.jgit.transport.GitProtocolConstants.PACKET_ACK;
@@ -80,7 +80,6 @@ import org.eclipse.jgit.errors.PackProtocolException;
 import org.eclipse.jgit.internal.JGitText;
 import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider;
 import org.eclipse.jgit.internal.storage.pack.PackWriter;
-import org.eclipse.jgit.internal.transport.parser.FirstWant;
 import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.NullProgressMonitor;
 import org.eclipse.jgit.lib.ObjectId;
@@ -172,52 +171,6 @@ public class UploadPack implements Closeable {
                                throws PackProtocolException, IOException;
        }
 
-       /**
-        * Data in the first line of a want-list, the line itself plus options.
-        *
-        * @deprecated Use {@link FirstWant} instead
-        */
-       @Deprecated
-       public static class FirstLine {
-
-               private final FirstWant firstWant;
-
-               /**
-                * @param line
-                *            line from the client.
-                */
-               public FirstLine(String line) {
-                       try {
-                               firstWant = FirstWant.fromLine(line);
-                       } catch (PackProtocolException e) {
-                               throw new UncheckedIOException(e);
-                       }
-               }
-
-               /**
-                * Get non-capabilities part of the line
-                *
-                * @return non-capabilities part of the line.
-                */
-               public String getLine() {
-                       return firstWant.getLine();
-               }
-
-               /**
-                * Get capabilities parsed from the line
-                *
-                * @return capabilities parsed from the line.
-                */
-               public Set<String> getOptions() {
-                       if (firstWant.getAgent() != null) {
-                               Set<String> caps = new HashSet<>(firstWant.getCapabilities());
-                               caps.add(OPTION_AGENT + '=' + firstWant.getAgent());
-                               return caps;
-                       }
-                       return firstWant.getCapabilities();
-               }
-       }
-
        /*
         * {@link java.util.function.Consumer} doesn't allow throwing checked
         * exceptions. Define our own to propagate IOExceptions.
@@ -1692,18 +1645,6 @@ public class UploadPack implements Closeable {
                return currentRequest.getDepth();
        }
 
-       /**
-        * Deprecated synonym for {@code getFilterSpec().getBlobLimit()}.
-        *
-        * @return filter blob limit requested by the client, or -1 if no limit
-        * @since 5.3
-        * @deprecated Use {@link #getFilterSpec()} instead
-        */
-       @Deprecated
-       public final long getFilterBlobLimit() {
-               return getFilterSpec().getBlobLimit();
-       }
-
        /**
         * Returns the filter spec for the current request. Valid only after
         * calling recvWants(). This may be a no-op filter spec, but it won't be