Skip to content

Commit

Permalink
refactor(artifacts): Use builder to create artifacts (#559)
Browse files Browse the repository at this point in the history
The all-arg and no-arg constructors for Artifact were deprecated
in spinnaker/kork#429. Replace their usages with a builder.
  • Loading branch information
ezimanyi authored and mergify[bot] committed Dec 4, 2019
1 parent 9f41894 commit 30b152f
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ public Artifact getArtifact(String name, String version) {
if (!name.equals("test") && !version.equals("v0.4.0")) {
throw new NotFoundException("Artifact not found");
}
return new Artifact(
"deb",
false,
"test",
"v0.4.0",
"artifactory//test/v0.4.0",
"artifactory//test/v0.4.0",
Collections.emptyMap(),
"testAccount",
"jenkins//test/v0.4.0",
"1234");
return Artifact.builder()
.type("deb")
.customKind(false)
.name("test")
.version("v0.4.0")
.location("artifactory//test/v0.4.0")
.reference("artifactory//test/v0.4.0")
.metadata(Collections.emptyMap())
.artifactAccount("testAccount")
.provenance("jenkins//test/v0.4.0")
.uuid("1234")
.build();
}
}

0 comments on commit 30b152f

Please sign in to comment.