]> source.dussan.org Git - jgit.git/commitdiff
Remove deprecated PatchApplier#applyPatch(InputStream) 05/1200405/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 30 Aug 2024 15:45:41 +0000 (17:45 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 3 Sep 2024 14:11:03 +0000 (16:11 +0200)
Change-Id: I79923b95861af983b676d436938aaeebe8c5b658

org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java

index cb6cc6efa714af500b18f3afe99801337fc81eeb..23e09b94794ccfe3481f7570b0d47433541a17c7 100644 (file)
@@ -41,7 +41,6 @@ import java.util.zip.InflaterInputStream;
 
 import org.eclipse.jgit.annotations.Nullable;
 import org.eclipse.jgit.api.errors.FilterFailedException;
-import org.eclipse.jgit.api.errors.PatchFormatException;
 import org.eclipse.jgit.attributes.Attribute;
 import org.eclipse.jgit.attributes.Attributes;
 import org.eclipse.jgit.attributes.FilterCommand;
@@ -287,32 +286,6 @@ public class PatchApplier {
                }
        }
 
-       /**
-        * Applies the given patch
-        *
-        * @param patchInput
-        *            the patch to apply.
-        * @return the result of the patch
-        * @throws PatchFormatException
-        *             if the patch cannot be parsed
-        * @throws IOException
-        *             if the patch read fails
-        * @deprecated use {@link #applyPatch(Patch)} instead
-        */
-       @Deprecated
-       public Result applyPatch(InputStream patchInput)
-                       throws PatchFormatException, IOException {
-               Patch p = new Patch();
-               try (InputStream inStream = patchInput) {
-                       p.parse(inStream);
-
-                       if (!p.getErrors().isEmpty()) {
-                               throw new PatchFormatException(p.getErrors());
-                       }
-               }
-               return applyPatch(p);
-       }
-
        /**
         * Applies the given patch
         *