Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A144611471 for ; Wed, 13 Aug 2014 06:41:38 +0000 (UTC) Received: (qmail 82636 invoked by uid 500); 13 Aug 2014 06:41:38 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 82607 invoked by uid 500); 13 Aug 2014 06:41:38 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 82597 invoked by uid 99); 13 Aug 2014 06:41:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2014 06:41:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DECED9A4333; Wed, 13 Aug 2014 06:41:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hugo@apache.org To: commits@cloudstack.apache.org Message-Id: <7e190bf9e7464eb3a5f02e58a810d939@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/bugfix/CID-1230585 to d2aa1c4 Date: Wed, 13 Aug 2014 06:41:37 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/bugfix/CID-1230585 [created] d2aa1c4aa Fix concurrency issues CID-1230585 and CID-1230586 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d2aa1c4a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d2aa1c4a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d2aa1c4a Branch: refs/heads/bugfix/CID-1230585 Commit: d2aa1c4aa1c9c0993fb5e68af189d011c258e35d Parents: 9d7b851 Author: Hugo Trippaers Authored: Wed Aug 13 08:39:40 2014 +0200 Committer: Hugo Trippaers Committed: Wed Aug 13 08:39:40 2014 +0200 ---------------------------------------------------------------------- core/src/com/cloud/resource/ServerResourceBase.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2aa1c4a/core/src/com/cloud/resource/ServerResourceBase.java ---------------------------------------------------------------------- diff --git a/core/src/com/cloud/resource/ServerResourceBase.java b/core/src/com/cloud/resource/ServerResourceBase.java index 082067f..a24ea98 100755 --- a/core/src/com/cloud/resource/ServerResourceBase.java +++ b/core/src/com/cloud/resource/ServerResourceBase.java @@ -26,6 +26,7 @@ import java.net.SocketException; import java.util.ArrayList; import java.util.Date; import java.util.Enumeration; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -100,9 +101,9 @@ public abstract class ServerResourceBase implements ServerResource { final String nicName = nic.getName(); // try { if (//!nic.isLoopback() && - //nic.isUp() && - !nic.isVirtual() && !nicName.startsWith("vnif") && !nicName.startsWith("vnbr") && !nicName.startsWith("peth") && !nicName.startsWith("vif") && - !nicName.startsWith("virbr") && !nicName.contains(":")) { + //nic.isUp() && + !nic.isVirtual() && !nicName.startsWith("vnif") && !nicName.startsWith("vnbr") && !nicName.startsWith("peth") && !nicName.startsWith("vif") && + !nicName.startsWith("virbr") && !nicName.contains(":")) { final String[] info = NetUtils.getNicParams(nicName); if (info != null && info[0] != null) { _privateNic = nic; @@ -237,16 +238,16 @@ public abstract class ServerResourceBase implements ServerResource { protected List getWarnings() { synchronized (_warnings) { - final ArrayList results = _warnings; - _warnings = new ArrayList(); + final List results = new LinkedList(_warnings); + _warnings.clear(); return results; } } protected List getErrors() { synchronized (_errors) { - final ArrayList result = _errors; - _errors = new ArrayList(); + final List result = new LinkedList(_errors); + _errors.clear(); return result; } }