]> source.dussan.org Git - jgit.git/commitdiff
Suppress deprecation warnings related to UploadPackLogger 33/81533/4
authorDavid Pursehouse <david.pursehouse@gmail.com>
Wed, 21 Sep 2016 07:07:24 +0000 (09:07 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 22 Sep 2016 07:46:25 +0000 (09:46 +0200)
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 <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java

index d1fd67e97728cd56c61170d4f35d5f4b8192024f..2ef097af79c87a9d58dbd77d75047f79806e6304 100644 (file)
@@ -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;
index 85ebecc450109e506a001d61c4592b3fc4f64ff1..0588634d2a598fac33e454cde1bc8f9a6cbb01ed 100644 (file)
@@ -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) {