Polish
This commit is contained in:
@@ -134,7 +134,8 @@ class InitializrService {
|
||||
*/
|
||||
private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) {
|
||||
HttpGet request = new HttpGet(url);
|
||||
request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, "application/vnd.initializr.v2+json"));
|
||||
request.setHeader(new BasicHeader(HttpHeaders.ACCEPT,
|
||||
"application/vnd.initializr.v2+json"));
|
||||
return execute(request, url, "retrieve metadata");
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,8 @@ class InitializrServiceMetadata {
|
||||
}
|
||||
JSONObject type = root.getJSONObject(TYPE_EL);
|
||||
JSONArray array = type.getJSONArray(VALUES_EL);
|
||||
String defaultType = type.has(DEFAULT_ATTRIBUTE) ? type.getString(DEFAULT_ATTRIBUTE) : null;
|
||||
String defaultType = type.has(DEFAULT_ATTRIBUTE) ? type
|
||||
.getString(DEFAULT_ATTRIBUTE) : null;
|
||||
for (int i = 0; i < array.length(); i++) {
|
||||
JSONObject typeJson = array.getJSONObject(i);
|
||||
ProjectType projectType = parseType(typeJson, defaultType);
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -209,7 +208,8 @@ class ProjectGenerationRequest {
|
||||
}
|
||||
|
||||
if (!this.dependencies.isEmpty()) {
|
||||
builder.setParameter("dependencies", StringUtils.collectionToCommaDelimitedString(this.dependencies));
|
||||
builder.setParameter("dependencies",
|
||||
StringUtils.collectionToCommaDelimitedString(this.dependencies));
|
||||
}
|
||||
if (this.javaVersion != null) {
|
||||
builder.setParameter("javaVersion", this.javaVersion);
|
||||
|
||||
Reference in New Issue
Block a user