From: David Pursehouse Date: Wed, 21 Sep 2016 07:07:24 +0000 (+0200) Subject: Suppress deprecation warnings related to UploadPackLogger X-Git-Tag: v4.6.0.201612231935-r~108 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01935f8f50699db09e9e6f4e725913b907d7cbd5;p=jgit.git Suppress deprecation warnings related to UploadPackLogger UploadPackLogger is deprecated but will not be removed until JGit version 5.0. Suppress the unavoidable deprecation warnings on usages of the interface that are kept for backwards compatibility. Add a TODO so that we don't forget to remove it in 5.0. Change-Id: Id248002b9bdf23db192427196d54c722a012106c Signed-off-by: David Pursehouse --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index d1fd67e977..2ef097af79 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -313,6 +313,7 @@ public class UploadPack { private PackStatistics statistics; + @SuppressWarnings("deprecation") private UploadPackLogger logger = UploadPackLogger.NULL; /** @@ -1428,6 +1429,7 @@ public class UploadPack { } } + @SuppressWarnings("deprecation") private void sendPack(final boolean sideband) throws IOException { ProgressMonitor pm = NullProgressMonitor.INSTANCE; OutputStream packOut = rawOut; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java index 85ebecc450..0588634d2a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java @@ -56,7 +56,7 @@ import org.eclipse.jgit.internal.storage.pack.PackWriter; * @deprecated use {@link PostUploadHook} instead */ @Deprecated -public interface UploadPackLogger { +public interface UploadPackLogger { // TODO remove in JGit 5.0 /** A simple no-op logger. */ public static final UploadPackLogger NULL = new UploadPackLogger() { public void onPackStatistics(PackWriter.Statistics stats) {