Skip to content

Commit 779b176

Browse files
authored
Add full OAuth2 support to jersey2-experimental codegen (#6183)
* Add full Oauth2 support to Jersey client * Regenerate jersey2-experimental sample * Regenerate all java clients
1 parent 3de5878 commit 779b176

File tree

27 files changed

+1158
-200
lines changed

27 files changed

+1158
-200
lines changed

modules/openapi-generator/src/main/resources/Java/StringUtil.mustache

+22
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
package {{invokerPackage}};
44

5+
import java.util.Collection;
6+
import java.util.Iterator;
7+
58
{{>generatedAnnotation}}
69
public class StringUtil {
710
/**
@@ -47,4 +50,23 @@ public class StringUtil {
4750
}
4851
return out.toString();
4952
}
53+
54+
/**
55+
* Join a list of strings with the given separator.
56+
*
57+
* @param list The list of strings
58+
* @param separator The separator
59+
* @return the resulting string
60+
*/
61+
public static String join(Collection<String> list, String separator) {
62+
Iterator<String> iterator = list.iterator();
63+
StringBuilder out = new StringBuilder();
64+
if (iterator.hasNext()) {
65+
out.append(iterator.next());
66+
}
67+
while (iterator.hasNext()) {
68+
out.append(separator).append(iterator.next());
69+
}
70+
return out.toString();
71+
}
5072
}

0 commit comments

Comments
 (0)