JC created CLOUDSTACK-10048: ------------------------------- Summary: Collection added to itself Key: CLOUDSTACK-10048 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10048 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Reporter: JC Priority: Trivial
Hi In a recent github mirror, I've found a following suspicious code about collection added to itself. Branch: master path: framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java {code:java} ... 45 private List<String> packages = new ArrayList<String>(); ... 56 public OnwireClassRegistry(List<String> packages) { 57 packages.addAll(packages); 58 } {code} In Line 57, `packages' is added to itself. Should it be this.packages.addAll(packages)? This might be a trivial issue, but I wanted to report just in case. Thanks! -- This message was sent by Atlassian JIRA (v6.4.14#64029)