@@ -31,27 +31,10 @@ public class Util {
3131 private Util () { // no instances
3232 }
3333
34- // feign.Util
35- /**
36- * The HTTP Accept header field name.
37- */
38- public static final String ACCEPT = "Accept" ;
3934 /**
4035 * The HTTP Content-Length header field name.
4136 */
4237 public static final String CONTENT_LENGTH = "Content-Length" ;
43- /**
44- * The HTTP Content-Type header field name.
45- */
46- public static final String CONTENT_TYPE = "Content-Type" ;
47- /**
48- * The HTTP Host header field name.
49- */
50- public static final String HOST = "Host" ;
51- /**
52- * The HTTP Location header field name.
53- */
54- public static final String LOCATION = "Location" ;
5538 /**
5639 * The HTTP Retry-After header field name.
5740 */
@@ -108,19 +91,6 @@ public static String emptyToNull(String string) {
10891 return string == null || string .isEmpty () ? null : string ;
10992 }
11093
111- public static String join (char separator , String ... parts ) {
112- if (parts == null || parts .length == 0 )
113- return "" ;
114- StringBuilder to = new StringBuilder ();
115- for (int i = 0 ; i < parts .length ; i ++) {
116- to .append (parts [i ]);
117- if (i + 1 < parts .length ) {
118- to .append (separator );
119- }
120- }
121- return to .toString ();
122- }
123-
12494 /**
12595 * Adapted from {@code com.google.common.base.Strings#emptyToNull}.
12696 */
@@ -144,11 +114,4 @@ public static <T> T[] toArray(Iterable<? extends T> iterable, Class<T> type) {
144114 public static <T > Collection <T > valuesOrEmpty (Map <String , Collection <T >> map , String key ) {
145115 return map .containsKey (key ) ? map .get (key ) : Collections .<T >emptyList ();
146116 }
147-
148- public static <T > T firstOrNull (Map <String , Collection <T >> map , String key ) {
149- if (map .containsKey (key ) && !map .get (key ).isEmpty ()) {
150- return map .get (key ).iterator ().next ();
151- }
152- return null ;
153- }
154117}
0 commit comments