]> source.dussan.org Git - jgit.git/commitdiff
PacketLineIn: Deprecate the END constant 76/143176/3
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 2 Jun 2019 08:27:17 +0000 (17:27 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 2 Jun 2019 23:07:24 +0000 (08:07 +0900)
Deprecate the constant with the intention of making it private in
a future release.

All existing usage of the constant within JGit code has already been
replaced with the recommended alternatives in preceding commits.

Change-Id: I10eb95f3f92cb74f93a26bf1a6edd24615b75c6f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java

index e218c1e608a5c17cec8358657d688b37598907bd..90f1b373ba70fe813ffed1267bffee0ad3259e28 100644 (file)
@@ -74,7 +74,15 @@ import org.slf4j.LoggerFactory;
 public class PacketLineIn {
        private static final Logger log = LoggerFactory.getLogger(PacketLineIn.class);
 
-       /** Magic return from {@link #readString()} when a flush packet is found. */
+       /**
+        * Magic return from {@link #readString()} when a flush packet is found.
+        *
+        * @deprecated Callers should use {@link #isEnd(String)} to check if a
+        *             string is the end marker, or
+        *             {@link PacketLineIn#readStrings()} to iterate over all
+        *             strings in the input stream until the marker is reached.
+        */
+       @Deprecated
        public static final String END = new StringBuilder(0).toString();       /* must not string pool */
 
        /**