Skip to content

Commit

Permalink
style: process checkstyle violations
Browse files Browse the repository at this point in the history
  • Loading branch information
aikebah committed Jul 31, 2023
1 parent 4a46f13 commit 7f58fb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void prepareFileTypeAnalyzer(Engine engine) throws InitializationExceptio
*/
private NexusSearch createNexusSearchOrDisable(boolean useProxy) throws InitializationException {
final Settings settings = getSettings();
final String nexusRootURL=settings.getString(Settings.KEYS.ANALYZER_NEXUS_URL);
final String nexusRootURL = settings.getString(Settings.KEYS.ANALYZER_NEXUS_URL);
final NexusSearch result;
try {
if (nexusRootURL.toLowerCase(Locale.ROOT).contains("service/local/")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.ArrayList;
import java.util.Base64;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
* Class of methods to search Nexus v3 repositories.
Expand Down Expand Up @@ -108,7 +112,8 @@ public MavenArtifact searchSha1(String sha1) throws IOException {
}
}

private String retrievePageAndAddMatchingArtifact(List<MavenArtifact> collectedMatchingArtifacts, String sha1, String continuationToken) throws IOException {
private String retrievePageAndAddMatchingArtifact(List<MavenArtifact> collectedMatchingArtifacts, String sha1, String continuationToken)
throws IOException {
final URL url;
LOGGER.debug("Search with continuation token {}", continuationToken);
if (continuationToken == null) {
Expand Down Expand Up @@ -150,7 +155,7 @@ private String parseResponse(HttpURLConnection conn, String sha1, List<MavenArti
try (InputStream in = new BufferedInputStream(conn.getInputStream());
JsonReader jsonReader = Json.createReader(in)) {
final JsonObject jsonResponse = jsonReader.readObject();
String continuationToken = jsonResponse.getString("continuationToken", null);
final String continuationToken = jsonResponse.getString("continuationToken", null);
final JsonArray components = jsonResponse.getJsonArray("items");
boolean found = false;
for (int i = 0; i < components.size() && !found; i++) {
Expand Down

0 comments on commit 7f58fb2

Please sign in to comment.