This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 52dcd0c [CXF-7533] Fix non-functional 'setBus' method, patch from
Manuel Siggen applied, This closes #322
52dcd0c is described below
commit 52dcd0cd79279da653cf769ba7159dba896f570b
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Thu Oct 19 12:58:48 2017 +0100
[CXF-7533] Fix non-functional 'setBus' method, patch from Manuel Siggen
applied, This closes #322
---
.../provider/AbstractConfigurableProvider.java | 2 +-
.../provider/AbstractConfigurableProviderTest.java | 40 ++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProvider.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProvider.java
index d8e6c3e..554d633 100644
---
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProvider.java
+++
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProvider.java
@@ -49,7 +49,7 @@ public abstract class AbstractConfigurableProvider {
* @param b
*/
public void setBus(Bus b) {
- if (bus != null) {
+ if (b != null) {
bus = b;
}
}
diff --git
a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProviderTest.java
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProviderTest.java
new file mode 100644
index 0000000..7029e85
--- /dev/null
+++
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProviderTest.java
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.provider;
+
+import org.apache.cxf.Bus;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class AbstractConfigurableProviderTest {
+ /**
+ * [CXF-7533] Make sure setter is functional.
+ */
+ @Test
+ public void testSetBus() throws Exception {
+
+ AbstractConfigurableProvider provider = new
AbstractConfigurableProvider() { };
+ Bus bus = EasyMock.createMock(Bus.class);
+
+ provider.setBus(bus);
+ Assert.assertSame(bus, provider.getBus());
+ }
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].