Skip to content

Commit

Permalink
Merge pull request #117 from eyalbe4/master
Browse files Browse the repository at this point in the history
HAP-1151 - Plugin needs concurrent data structure
  • Loading branch information
eyalbe4 committed Feb 24, 2019
2 parents 1ad4400 + 318a4bd commit 8c3469c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
import java.io.IOException;
import java.io.Serializable;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;

/**
* Created by romang on 8/15/16.
*/
public class DockerAgentUtils implements Serializable {
// Docker images cache. Every image which is intersepted by the Build-Info Proxy, is added to this cache,
// so that it can be used to create the build-info in Artifactory.
private static final List<DockerImage> images = Collections.synchronizedList(new ArrayList<DockerImage>());
private static final List<DockerImage> images = new CopyOnWriteArrayList<>();

/**
* Registers an image to be captured by the build-info proxy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand All @@ -40,13 +41,13 @@ public class BuildInfo implements Serializable {
private String number; // Build number
private Date startDate;
private BuildRetention retention;
private List<BuildDependency> buildDependencies = Collections.synchronizedList(new ArrayList<>());
private List<Artifact> deployedArtifacts = Collections.synchronizedList(new ArrayList<>());
private List<BuildDependency> buildDependencies = new CopyOnWriteArrayList<>();
private List<Artifact> deployedArtifacts = new CopyOnWriteArrayList<>();
// The candidates artifacts to be deployed in the 'deployArtifacts' step.
private List<DeployDetails> deployableArtifacts = Collections.synchronizedList(new ArrayList<>());
private List<Dependency> publishedDependencies = Collections.synchronizedList(new ArrayList<>());
private List<DeployDetails> deployableArtifacts = new CopyOnWriteArrayList<>();
private List<Dependency> publishedDependencies = new CopyOnWriteArrayList<>();

private List<Module> modules = Collections.synchronizedList(new ArrayList<>());
private List<Module> modules = new CopyOnWriteArrayList<>();
private Env env = new Env();
private String agentName;

Expand Down

0 comments on commit 8c3469c

Please sign in to comment.