summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2019-06-02 11:13:36 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-06-03 08:07:24 +0900
commite99aaa5f791c43bcac050a26dcb970ae2584130a (patch)
tree7a2cb69b36d3e49295ebe15f42ceac560f7dfe5f /org.eclipse.jgit
parent7377b8dd01b56caa85b47e5b2da32a9b784315d3 (diff)
downloadjgit-e99aaa5f791c43bcac050a26dcb970ae2584130a.tar.gz
jgit-e99aaa5f791c43bcac050a26dcb970ae2584130a.zip
PacketLineIn: Deprecate DELIM constant
Deprecate DELIM with the intention of making it private in a future release. Callers that want to test if a packet line string is the delimiter should use the isDelimiter(String) method. The only other references to DELIM in the JGit code are in tests. For those, introduce a package visible delimiter() method. Change-Id: I21e8bbac0ffb9ef710c9753e23435416b09a4891 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
index 2243175eaf..62f71e6931 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
@@ -79,7 +79,10 @@ public class PacketLineIn {
* Magic return from {@link #readString()} when a delim packet is found.
*
* @since 5.0
+ * @deprecated Callers should use {@link #isDelimiter(String)} to check if a
+ * string is the delimiter.
*/
+ @Deprecated
public static final String DELIM = new StringBuilder(0).toString(); /* must not string pool */
static enum AckNackResult {
@@ -237,6 +240,17 @@ public class PacketLineIn {
}
/**
+ * Get the delimiter marker.
+ * <p>
+ * Intended for use only in tests.
+ *
+ * @return The delimiter marker.
+ */
+ static String delimiter() {
+ return DELIM;
+ }
+
+ /**
* Check if a string is the packet end marker.
*
* @param s