You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/06/04 15:59:49 UTC
git commit: Fix some race conditions in the EndpointPolicyImpl
Repository: cxf
Updated Branches:
refs/heads/master 7012de652 -> b7ad1f3c5
Fix some race conditions in the EndpointPolicyImpl
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b7ad1f3c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b7ad1f3c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b7ad1f3c
Branch: refs/heads/master
Commit: b7ad1f3c5014a3e8ca6af8b91ed26252fb1b8a61
Parents: 7012de6
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Jun 4 09:59:24 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Jun 4 09:59:41 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/b7ad1f3c/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 12f78bf..3df3c3b 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(Message m) {
+ synchronized void initializeVocabulary(Message m) {
+ if (vocabulary != null) {
+ return;
+ }
+
vocabulary = new ArrayList<Assertion>();
if (requestor) {
faultVocabulary = new ArrayList<Assertion>();
@@ -269,7 +273,11 @@ public class EndpointPolicyImpl implements EndpointPolicy {
}
}
- void initializeInterceptors(Message m) {
+ synchronized void initializeInterceptors(Message m) {
+ if (interceptors != null) {
+ return;
+ }
+
if (engine == null || engine.getBus() == null
|| engine.getBus().getExtension(PolicyInterceptorProviderRegistry.class) == null) {
return;