Skip to content

Commit

Permalink
checkstyle corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Mar 1, 2015
1 parent a40060e commit 21b2486
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package org.owasp.dependencycheck.data.nexus;

import java.io.File;

/**
* Simple bean representing a Maven Artifact.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public class NexusSearch {
/**
* Creates a NexusSearch for the given repository URL.
*
* @param rootURL the root URL of the repository on which searches should execute. full URL's are calculated
* relative to this URL, so it should end with a /
* @param rootURL the root URL of the repository on which searches should execute. full URL's are calculated relative to this
* URL, so it should end with a /
*/
public NexusSearch(URL rootURL) {
this.rootURL = rootURL;
Expand All @@ -78,13 +78,12 @@ public NexusSearch(URL rootURL) {
}

/**
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a
* <code>MavenArtifact</code> is populated with the coordinate information.
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a <code>MavenArtifact</code> is
* populated with the coordinate information.
*
* @param sha1 The SHA-1 hash string for which to search
* @return the populated Maven coordinates
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not
* found.
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not found.
*/
public MavenArtifact searchSha1(String sha1) throws IOException {
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
Expand Down Expand Up @@ -135,12 +134,12 @@ public MavenArtifact searchSha1(String sha1) throws IOException {
.evaluate(
"/org.sonatype.nexus.rest.model.NexusArtifact/pomLink",
doc);
MavenArtifact ma = new MavenArtifact(groupId, artifactId, version);
final MavenArtifact ma = new MavenArtifact(groupId, artifactId, version);
if (link != null && !"".equals(link)) {
ma.setArtifactUrl(link);
ma.setArtifactUrl(link);
}
if (pomLink != null & !"".equals(pomLink)) {
ma.setPomUrl(pomLink);
ma.setPomUrl(pomLink);
}
return ma;
} catch (Throwable e) {
Expand Down

0 comments on commit 21b2486

Please sign in to comment.