Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-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 71EB8117F7 for ; Wed, 4 Jun 2014 15:11:01 +0000 (UTC) Received: (qmail 3769 invoked by uid 500); 4 Jun 2014 15:11:01 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 3629 invoked by uid 500); 4 Jun 2014 15:11:01 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 3407 invoked by uid 99); 4 Jun 2014 15:11:01 -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, 04 Jun 2014 15:11:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D417E892BB4; Wed, 4 Jun 2014 15:11:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Wed, 04 Jun 2014 15:11:04 -0000 Message-Id: In-Reply-To: <2b83c8b303be457cb0b935e544a10d53@git.apache.org> References: <2b83c8b303be457cb0b935e544a10d53@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/7] git commit: Fix some race conditions in the EndpointPolicyImpl Fix some race conditions in the EndpointPolicyImpl Conflicts: rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5eea9332 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5eea9332 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5eea9332 Branch: refs/heads/2.7.x-fixes Commit: 5eea93321f5e6041df90ebf8f11ef055c112a31d Parents: 6346140 Author: Daniel Kulp Authored: Wed Jun 4 09:59:24 2014 -0400 Committer: Daniel Kulp Committed: Wed Jun 4 10:54:13 2014 -0400 ---------------------------------------------------------------------- .../org/apache/cxf/ws/policy/EndpointPolicyImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/5eea9332/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java ---------------------------------------------------------------------- diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java index f9a6bf9..3f68e98 100644 --- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java +++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java @@ -189,7 +189,11 @@ public class EndpointPolicyImpl implements EndpointPolicy { } } - void initializeVocabulary() { + synchronized void initializeVocabulary() { + if (vocabulary != null) { + return; + } + vocabulary = new ArrayList(); if (requestor) { faultVocabulary = new ArrayList(); @@ -269,7 +273,11 @@ public class EndpointPolicyImpl implements EndpointPolicy { } } - void initializeInterceptors() { + synchronized void initializeInterceptors() { + if (interceptors != null) { + return; + } + if (engine == null || engine.getBus() == null || engine.getBus().getExtension(PolicyInterceptorProviderRegistry.class) == null) { return;