Skip to content

Commit 88053ee

Browse files
committed
UserAgent: remove deprecated #getAgent, #hasAgent methods
Change-Id: Ib53de6dabea7f73ecfde85cb30f49fa05ee48551
1 parent d64e092 commit 88053ee

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
package org.eclipse.jgit.transport;
1212

13-
import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_AGENT;
14-
15-
import java.util.Set;
16-
1713
import org.eclipse.jgit.util.StringUtils;
1814

1915
/**
@@ -91,43 +87,6 @@ public static void set(String agent) {
9187
userAgent = StringUtils.isEmptyOrNull(agent) ? null : clean(agent);
9288
}
9389

94-
/**
95-
*
96-
* @param options
97-
* options
98-
* @param transportAgent
99-
* name of transport agent
100-
* @return The transport agent.
101-
* @deprecated Capabilities with <key>=<value> shape are now
102-
* parsed alongside other capabilities in the ReceivePack flow.
103-
*/
104-
@Deprecated
105-
static String getAgent(Set<String> options, String transportAgent) {
106-
if (options == null || options.isEmpty()) {
107-
return transportAgent;
108-
}
109-
for (String o : options) {
110-
if (o.startsWith(OPTION_AGENT)
111-
&& o.length() > OPTION_AGENT.length()
112-
&& o.charAt(OPTION_AGENT.length()) == '=') {
113-
return o.substring(OPTION_AGENT.length() + 1);
114-
}
115-
}
116-
return transportAgent;
117-
}
118-
119-
/**
120-
*
121-
* @param options
122-
* options
123-
* @return True if the transport agent is set. False otherwise.
124-
* @deprecated Capabilities with &lt;key&gt;=&lt;value&gt; shape are now
125-
* parsed alongside other capabilities in the ReceivePack flow.
126-
*/
127-
@Deprecated
128-
static boolean hasAgent(Set<String> options) {
129-
return getAgent(options, null) != null;
130-
}
13190

13291
private UserAgent() {
13392
}

0 commit comments

Comments
 (0)