cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5579] Adding getBus(boolean createIfNeeded) to AbstractEndpointFactory
Date Wed, 26 Feb 2014 12:03:37 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 36ec4ee12 -> 3ccc90d58


[CXF-5579] Adding getBus(boolean createIfNeeded) to AbstractEndpointFactory


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3ccc90d5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3ccc90d5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3ccc90d5

Branch: refs/heads/master
Commit: 3ccc90d58ed677e22aa724f7caeb54cac6b6ef97
Parents: 36ec4ee
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Feb 26 12:03:01 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Feb 26 12:03:01 2014 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/endpoint/AbstractEndpointFactory.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3ccc90d5/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java b/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
index 3e6974b..27f89c7 100644
--- a/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
+++ b/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
@@ -78,12 +78,16 @@ public abstract class AbstractEndpointFactory extends AbstractBasicInterceptorPr
     }
 
     public Bus getBus() {
-        if (bus == null) {
+        return getBus(true);
+    }
+    
+    public Bus getBus(boolean createIfNeeded) {
+        if (bus == null && createIfNeeded) {
             bus = BusFactory.getThreadDefaultBus();
         }
         return bus;
     }
-
+    
     public void setBus(Bus bus) {
         this.bus = bus;
     }


Mime
View raw message