mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 16:32:47 +00:00
Add full OAuth2 support to jersey2-experimental codegen (#6183)
* Add full Oauth2 support to Jersey client * Regenerate jersey2-experimental sample * Regenerate all java clients
This commit is contained in:
committed by
GitHub
parent
3de587826a
commit
779b176648
@@ -13,6 +13,9 @@
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
||||
public class StringUtil {
|
||||
/**
|
||||
@@ -58,4 +61,23 @@ public class StringUtil {
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Join a list of strings with the given separator.
|
||||
*
|
||||
* @param list The list of strings
|
||||
* @param separator The separator
|
||||
* @return the resulting string
|
||||
*/
|
||||
public static String join(Collection<String> list, String separator) {
|
||||
Iterator<String> iterator = list.iterator();
|
||||
StringBuilder out = new StringBuilder();
|
||||
if (iterator.hasNext()) {
|
||||
out.append(iterator.next());
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
out.append(separator).append(iterator.next());
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user