mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 08:39:24 +01:00
checkstyle corrections
Former-commit-id: 6e12b975c1975566ebef47fedef24c179a753e05
This commit is contained in:
@@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.owasp.dependencycheck.data.nexus;
|
package org.owasp.dependencycheck.data.nexus;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple bean representing a Maven Artifact.
|
* Simple bean representing a Maven Artifact.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ public class NexusSearch {
|
|||||||
/**
|
/**
|
||||||
* Creates a NexusSearch for the given repository URL.
|
* 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
|
* @param rootURL the root URL of the repository on which searches should execute. full URL's are calculated relative to this
|
||||||
* relative to this URL, so it should end with a /
|
* URL, so it should end with a /
|
||||||
*/
|
*/
|
||||||
public NexusSearch(URL rootURL) {
|
public NexusSearch(URL rootURL) {
|
||||||
this.rootURL = rootURL;
|
this.rootURL = rootURL;
|
||||||
@@ -78,13 +78,12 @@ public class NexusSearch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a
|
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a <code>MavenArtifact</code> is
|
||||||
* <code>MavenArtifact</code> is populated with the coordinate information.
|
* populated with the coordinate information.
|
||||||
*
|
*
|
||||||
* @param sha1 The SHA-1 hash string for which to search
|
* @param sha1 The SHA-1 hash string for which to search
|
||||||
* @return the populated Maven coordinates
|
* @return the populated Maven coordinates
|
||||||
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not
|
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not found.
|
||||||
* found.
|
|
||||||
*/
|
*/
|
||||||
public MavenArtifact searchSha1(String sha1) throws IOException {
|
public MavenArtifact searchSha1(String sha1) throws IOException {
|
||||||
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
|
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
|
||||||
@@ -135,7 +134,7 @@ public class NexusSearch {
|
|||||||
.evaluate(
|
.evaluate(
|
||||||
"/org.sonatype.nexus.rest.model.NexusArtifact/pomLink",
|
"/org.sonatype.nexus.rest.model.NexusArtifact/pomLink",
|
||||||
doc);
|
doc);
|
||||||
MavenArtifact ma = new MavenArtifact(groupId, artifactId, version);
|
final MavenArtifact ma = new MavenArtifact(groupId, artifactId, version);
|
||||||
if (link != null && !"".equals(link)) {
|
if (link != null && !"".equals(link)) {
|
||||||
ma.setArtifactUrl(link);
|
ma.setArtifactUrl(link);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user