cxf git commit: Removing jaxrs segment in Tracing id property names
Repository: cxf Updated Branches: refs/heads/master 1db0f0bbe -> 6192919b2 Removing jaxrs segment in Tracing id property names Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6192919b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6192919b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6192919b Branch: refs/heads/master Commit: 6192919b2afd6039f09fece7bc80d252c398c97e Parents: 1db0f0b Author: Sergey Beryozkin Authored: Thu Jun 4 10:03:09 2015 +0100 Committer: Sergey Beryozkin Committed: Thu Jun 4 10:03:09 2015 +0100 -- .../src/main/java/org/apache/cxf/tracing/TracerHeaders.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/6192919b/rt/management/src/main/java/org/apache/cxf/tracing/TracerHeaders.java -- diff --git a/rt/management/src/main/java/org/apache/cxf/tracing/TracerHeaders.java b/rt/management/src/main/java/org/apache/cxf/tracing/TracerHeaders.java index be5de3a..dd212ca 100644 --- a/rt/management/src/main/java/org/apache/cxf/tracing/TracerHeaders.java +++ b/rt/management/src/main/java/org/apache/cxf/tracing/TracerHeaders.java @@ -19,8 +19,8 @@ package org.apache.cxf.tracing; public final class TracerHeaders { -public static final String HEADER_TRACE_ID = "org.apache.cxf.jaxrs.tracing.header.trace_id"; -public static final String HEADER_SPAN_ID = "org.apache.cxf.jaxrs.tracing.header.span_id"; +public static final String HEADER_TRACE_ID = "org.apache.cxf.tracing.header.trace_id"; +public static final String HEADER_SPAN_ID = "org.apache.cxf.tracing.header.span_id"; public static final String DEFAULT_HEADER_TRACE_ID = "X-Trace-Id"; public static final String DEFAULT_HEADER_SPAN_ID = "X-Span-Id";
cxf git commit: [CXF-6434] slightly simplify the code and add test cases
Repository: cxf Updated Branches: refs/heads/master 6192919b2 -> 38d3b4214 [CXF-6434] slightly simplify the code and add test cases Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/38d3b421 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/38d3b421 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/38d3b421 Branch: refs/heads/master Commit: 38d3b4214cda34716c8b00c7d50fc0f7346a729b Parents: 6192919 Author: Akitoshi Yoshida Authored: Thu Jun 4 12:06:56 2015 +0200 Committer: Akitoshi Yoshida Committed: Thu Jun 4 12:08:18 2015 +0200 -- .../interceptor/SoapActionInInterceptor.java| 7 +- .../SoapActionInInterceptorTest.java| 190 +++ 2 files changed, 194 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/38d3b421/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java -- diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java index c2ddd43..ca4af42 100644 --- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java +++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java @@ -81,10 +81,11 @@ public class SoapActionInInterceptor extends AbstractSoapInterceptor { } int start = ct.indexOf("action="); -if (start == -1 && ct.indexOf("multipart/related") == 0) { +if (start == -1 && ct.indexOf("multipart/related") == 0 && ct.indexOf("start-info") == -1) { // the action property may not be found at the package's content-type for non-mtom multipart message -List cts = CastUtils.cast((List)(CastUtils.cast( -(Map)message.get(AttachmentDeserializer.ATTACHMENT_PART_HEADERS)).get(Message.CONTENT_TYPE))); +// but skip searching if the start-info property is set +List cts = CastUtils.cast((List)(((Map) + message.get(AttachmentDeserializer.ATTACHMENT_PART_HEADERS)).get(Message.CONTENT_TYPE))); if (cts != null && cts.size() > 0) { ct = cts.get(0); start = ct.indexOf("action="); http://git-wip-us.apache.org/repos/asf/cxf/blob/38d3b421/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java -- diff --git a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java new file mode 100644 index 000..206b752 --- /dev/null +++ b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java @@ -0,0 +1,190 @@ +/** + * 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.binding.soap.interceptor; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.cxf.attachment.AttachmentDeserializer; +import org.apache.cxf.binding.soap.Soap11; +import org.apache.cxf.binding.soap.Soap12; +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.SoapVersion; +import org.apache.cxf.message.Message; +import org.easymock.EasyMock; +import org.easymock.IMocksControl; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + */ +public class SoapActionInInterceptorTest extends Assert { +private IMocksControl control; + +@Before +public void setUp() { +control = EasyMock.createNiceControl(); +} + +@Test +public void testGetSoapActionForSOAP11() t
cxf git commit: [CXF-6434] slightly simplify the code and add test cases
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes e6595a6bc -> 32812b2bd [CXF-6434] slightly simplify the code and add test cases Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/32812b2b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/32812b2b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/32812b2b Branch: refs/heads/3.0.x-fixes Commit: 32812b2bd313f98ac0f0bbead80b53aa15a62c9d Parents: e6595a6 Author: Akitoshi Yoshida Authored: Thu Jun 4 12:06:56 2015 +0200 Committer: Akitoshi Yoshida Committed: Thu Jun 4 12:08:52 2015 +0200 -- .../interceptor/SoapActionInInterceptor.java| 7 +- .../SoapActionInInterceptorTest.java| 190 +++ 2 files changed, 194 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/32812b2b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java -- diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java index ede1404..b9ad7d7 100644 --- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java +++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java @@ -81,10 +81,11 @@ public class SoapActionInInterceptor extends AbstractSoapInterceptor { } int start = ct.indexOf("action="); -if (start == -1 && ct.indexOf("multipart/related") == 0) { +if (start == -1 && ct.indexOf("multipart/related") == 0 && ct.indexOf("start-info") == -1) { // the action property may not be found at the package's content-type for non-mtom multipart message -List cts = CastUtils.cast((List)(CastUtils.cast( -(Map)message.get(AttachmentDeserializer.ATTACHMENT_PART_HEADERS)).get(Message.CONTENT_TYPE))); +// but skip searching if the start-info property is set +List cts = CastUtils.cast((List)(((Map) + message.get(AttachmentDeserializer.ATTACHMENT_PART_HEADERS)).get(Message.CONTENT_TYPE))); if (cts != null && cts.size() > 0) { ct = cts.get(0); start = ct.indexOf("action="); http://git-wip-us.apache.org/repos/asf/cxf/blob/32812b2b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java -- diff --git a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java new file mode 100644 index 000..206b752 --- /dev/null +++ b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java @@ -0,0 +1,190 @@ +/** + * 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.binding.soap.interceptor; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.cxf.attachment.AttachmentDeserializer; +import org.apache.cxf.binding.soap.Soap11; +import org.apache.cxf.binding.soap.Soap12; +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.SoapVersion; +import org.apache.cxf.message.Message; +import org.easymock.EasyMock; +import org.easymock.IMocksControl; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + */ +public class SoapActionInInterceptorTest extends Assert { +private IMocksControl control; + +@Before +public void setUp() { +control = EasyMock.createNiceControl(); +} + +@Test +public void testGetSoapActionFor
cxf git commit: [CXF-6434] slightly simplify the code and add test cases
Repository: cxf Updated Branches: refs/heads/2.7.x-fixes 243baef41 -> 292ab8fba [CXF-6434] slightly simplify the code and add test cases Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/292ab8fb Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/292ab8fb Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/292ab8fb Branch: refs/heads/2.7.x-fixes Commit: 292ab8fbabdf38132352df8dde43b2828149b885 Parents: 243baef Author: Akitoshi Yoshida Authored: Thu Jun 4 12:06:56 2015 +0200 Committer: Akitoshi Yoshida Committed: Thu Jun 4 12:19:06 2015 +0200 -- .../interceptor/SoapActionInInterceptor.java| 7 +- .../SoapActionInInterceptorTest.java| 189 +++ 2 files changed, 193 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/292ab8fb/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java -- diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java index 11a20ea..f079681 100644 --- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java +++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java @@ -80,10 +80,11 @@ public class SoapActionInInterceptor extends AbstractSoapInterceptor { } int start = ct.indexOf("action="); -if (start == -1 && ct.indexOf("multipart/related") == 0) { +if (start == -1 && ct.indexOf("multipart/related") == 0 && ct.indexOf("start-info") == -1) { // the action property may not be found at the package's content-type for non-mtom multipart message -List cts = CastUtils.cast((List)(CastUtils.cast( -(Map)message.get("javax.mail.internet.InternetHeaders")).get(Message.CONTENT_TYPE))); +// but skip searching if the start-info property is set +List cts = CastUtils.cast((List)(((Map) + message.get("javax.mail.internet.InternetHeaders")).get(Message.CONTENT_TYPE))); if (cts != null && cts.size() > 0) { ct = cts.get(0); start = ct.indexOf("action="); http://git-wip-us.apache.org/repos/asf/cxf/blob/292ab8fb/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java -- diff --git a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java new file mode 100644 index 000..286b28b --- /dev/null +++ b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptorTest.java @@ -0,0 +1,189 @@ +/** + * 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.binding.soap.interceptor; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.cxf.binding.soap.Soap11; +import org.apache.cxf.binding.soap.Soap12; +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.SoapVersion; +import org.apache.cxf.message.Message; +import org.easymock.EasyMock; +import org.easymock.IMocksControl; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + */ +public class SoapActionInInterceptorTest extends Assert { +private IMocksControl control; + +@Before +public void setUp() { +control = EasyMock.createNiceControl(); +} + +@Test +public void testGetSoapActionForSOAP11() throws Exception { +SoapMessage message = setUpMessage("tex
cxf git commit: [CXF-6360] Moving HTraceTracerContext into a diff package
Repository: cxf Updated Branches: refs/heads/master 38d3b4214 -> c2b70fd46 [CXF-6360] Moving HTraceTracerContext into a diff package Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c2b70fd4 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c2b70fd4 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c2b70fd4 Branch: refs/heads/master Commit: c2b70fd462955b714f0211ff52e1f99399666d44 Parents: 38d3b42 Author: Sergey Beryozkin Authored: Thu Jun 4 14:07:23 2015 +0100 Committer: Sergey Beryozkin Committed: Thu Jun 4 14:07:23 2015 +0100 -- .../tracing/htrace/HTraceContextProvider.java | 1 + .../tracing/htrace/HTraceTracerContext.java | 77 .../cxf/tracing/htrace/HTraceTracerContext.java | 77 3 files changed, 78 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/c2b70fd4/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceContextProvider.java -- diff --git a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceContextProvider.java b/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceContextProvider.java index c983f1d..12abac9 100644 --- a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceContextProvider.java +++ b/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceContextProvider.java @@ -23,6 +23,7 @@ import javax.ws.rs.ext.Provider; import org.apache.cxf.jaxrs.ext.ContextProvider; import org.apache.cxf.message.Message; import org.apache.cxf.tracing.TracerContext; +import org.apache.cxf.tracing.htrace.HTraceTracerContext; import org.apache.htrace.Sampler; import org.apache.htrace.impl.NeverSampler; http://git-wip-us.apache.org/repos/asf/cxf/blob/c2b70fd4/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceTracerContext.java -- diff --git a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceTracerContext.java b/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceTracerContext.java deleted file mode 100644 index 5694795..000 --- a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/jaxrs/tracing/htrace/HTraceTracerContext.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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.tracing.htrace; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.Callable; - -import org.apache.cxf.tracing.Traceable; -import org.apache.cxf.tracing.TracerContext; -import org.apache.htrace.Sampler; -import org.apache.htrace.Trace; -import org.apache.htrace.TraceScope; -import org.apache.htrace.wrappers.TraceCallable; - -public class HTraceTracerContext implements TracerContext { -private final Sampler< ? > sampler; - -public HTraceTracerContext(final Sampler< ? > sampler) { -this.sampler = sampler; -} - -@Override -@SuppressWarnings("unchecked") -public TraceScope startSpan(final String description) { -return Trace.startSpan(description, sampler); -} - -@Override -public Callable wrap(final String desription, final Traceable traceable) { -final Callable callable = new Callable() { -@Override -public T call() throws Exception { -return traceable.call(new HTraceTracerContext(sampler)); -} -}; - -// TODO: Replace with HTrace's wrap() method once the version with -// callable and description becomes available. -if (Trace.isTracing()) { -return new TraceCallable(Trace.currentSpan(), callable, desription); -} else { -return callable;
cxf git commit: [CXF-6438] Optimize ExtensionInvocationHandler
Repository: cxf Updated Branches: refs/heads/master c2b70fd46 -> d5585c4c3 [CXF-6438] Optimize ExtensionInvocationHandler Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d5585c4c Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d5585c4c Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d5585c4c Branch: refs/heads/master Commit: d5585c4c352803bfdf43e91d3c5dd2bea2abeb86 Parents: c2b70fd Author: Alessio Soldano Authored: Thu Jun 4 16:07:25 2015 +0200 Committer: Alessio Soldano Committed: Thu Jun 4 16:07:25 2015 +0200 -- .../cxf/common/util/ExtensionInvocationHandler.java | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/d5585c4c/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java index 1524c18..7672382 100644 --- a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java +++ b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java @@ -30,15 +30,13 @@ public class ExtensionInvocationHandler implements InvocationHandler { } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { -Class[] clzs = null; -if (args != null) { -clzs = new Class[args.length]; -for (int i = 0; i < args.length; i++) { -clzs[i] = args[i].getClass(); -} +if (method.getDeclaringClass().isAssignableFrom(obj.getClass())) { +return method.invoke(obj, args); +} else { +//in case obj has the required method with exact signature despite it's class +//not being assignable from the class declaring the specified method +Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); +return m.invoke(obj, args); } - -Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); -return m.invoke(obj, args); } }
cxf git commit: Comment typo
Repository: cxf Updated Branches: refs/heads/master d5585c4c3 -> a2c4be5e9 Comment typo Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a2c4be5e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a2c4be5e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a2c4be5e Branch: refs/heads/master Commit: a2c4be5e99472fc23b1740fc594e5d4c64961ca4 Parents: d5585c4 Author: Alessio Soldano Authored: Thu Jun 4 16:11:09 2015 +0200 Committer: Alessio Soldano Committed: Thu Jun 4 16:11:09 2015 +0200 -- .../org/apache/cxf/common/util/ExtensionInvocationHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/a2c4be5e/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java index 7672382..53185e8 100644 --- a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java +++ b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java @@ -33,7 +33,7 @@ public class ExtensionInvocationHandler implements InvocationHandler { if (method.getDeclaringClass().isAssignableFrom(obj.getClass())) { return method.invoke(obj, args); } else { -//in case obj has the required method with exact signature despite it's class +//in case obj has the required method with exact signature despite its class //not being assignable from the class declaring the specified method Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); return m.invoke(obj, args);
[2/3] cxf git commit: Comment typo
Comment typo Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8fc672b9 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8fc672b9 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8fc672b9 Branch: refs/heads/3.0.x-fixes Commit: 8fc672b9793339c70787d2e754d184eae6fb14cd Parents: e76de13 Author: Alessio Soldano Authored: Thu Jun 4 16:11:09 2015 +0200 Committer: Alessio Soldano Committed: Thu Jun 4 16:12:07 2015 +0200 -- .../org/apache/cxf/common/util/ExtensionInvocationHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc672b9/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java index 7672382..53185e8 100644 --- a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java +++ b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java @@ -33,7 +33,7 @@ public class ExtensionInvocationHandler implements InvocationHandler { if (method.getDeclaringClass().isAssignableFrom(obj.getClass())) { return method.invoke(obj, args); } else { -//in case obj has the required method with exact signature despite it's class +//in case obj has the required method with exact signature despite its class //not being assignable from the class declaring the specified method Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); return m.invoke(obj, args);
[1/3] cxf git commit: [CXF-6438] Optimize ExtensionInvocationHandler
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 32812b2bd -> 99311036f [CXF-6438] Optimize ExtensionInvocationHandler Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e76de136 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e76de136 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e76de136 Branch: refs/heads/3.0.x-fixes Commit: e76de136822100ba01f8f9902e689ce28e44a964 Parents: 32812b2 Author: Alessio Soldano Authored: Thu Jun 4 16:07:25 2015 +0200 Committer: Alessio Soldano Committed: Thu Jun 4 16:11:57 2015 +0200 -- .../cxf/common/util/ExtensionInvocationHandler.java | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e76de136/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java index 1524c18..7672382 100644 --- a/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java +++ b/core/src/main/java/org/apache/cxf/common/util/ExtensionInvocationHandler.java @@ -30,15 +30,13 @@ public class ExtensionInvocationHandler implements InvocationHandler { } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { -Class[] clzs = null; -if (args != null) { -clzs = new Class[args.length]; -for (int i = 0; i < args.length; i++) { -clzs[i] = args[i].getClass(); -} +if (method.getDeclaringClass().isAssignableFrom(obj.getClass())) { +return method.invoke(obj, args); +} else { +//in case obj has the required method with exact signature despite it's class +//not being assignable from the class declaring the specified method +Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); +return m.invoke(obj, args); } - -Method m = obj.getClass().getMethod(method.getName(), method.getParameterTypes()); -return m.invoke(obj, args); } }
[3/3] cxf git commit: Recording .gitmergeinfo Changes
Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/99311036 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/99311036 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/99311036 Branch: refs/heads/3.0.x-fixes Commit: 99311036ff037b6744c2f2ee90ff56b6e33db3b6 Parents: 8fc672b Author: Alessio Soldano Authored: Thu Jun 4 16:12:58 2015 +0200 Committer: Alessio Soldano Committed: Thu Jun 4 16:12:58 2015 +0200 -- .gitmergeinfo | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/99311036/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index 2b0dc40..5c479b2 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -465,6 +465,7 @@ M 9c7b2bc668a8b1e1d620aa79c3c32927b06a3ff3 M 9d25f9a0617bcb30e19d23fa4d5b4bd7948b8434 M 9f18da888e37f203b1aa9a3240ed7b6aab3a4ef9 M a088c793efd923a52f68044b02221f8b47569ef9 +M a2c4be5e99472fc23b1740fc594e5d4c64961ca4 M a3bf2a80bafa95ec2ccdd2b28ead26c13866acd7 M a5b1c33534d83b4d0696263439d0d1a906b1afe6 M a64265c29be124e9bffb46eb35a68b3504860c3a @@ -492,6 +493,7 @@ M d25e4c94c518cb79af1e05a32fb8ded52a951324 M d2dec5b87788b8cb5059d3719cf3dfd7135a1280 M d4a35c40d53fde17fec3d08c25215c7533dcb667 M d5315e072b8dd5222ede6f8e47c1e3e645209f59 +M d5585c4c352803bfdf43e91d3c5dd2bea2abeb86 M d7945c77da4f438cd7f52b1a512e65c62409d0ef M d9f4142e87bc8a4f31c1bd1560a01a18b5c66407 M da352523c42bf69ab743f75a5216a03e26a20bef
cxf git commit: [CXF-6440] Update Metrics to support Rest resources
Repository: cxf Updated Branches: refs/heads/master a2c4be5e9 -> 3cf195384 [CXF-6440] Update Metrics to support Rest resources Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3cf19538 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3cf19538 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3cf19538 Branch: refs/heads/master Commit: 3cf195384c2175085c7840dc4469837a347c7d0a Parents: a2c4be5 Author: Daniel Kulp Authored: Thu Jun 4 13:06:18 2015 -0400 Committer: Daniel Kulp Committed: Thu Jun 4 13:06:18 2015 -0400 -- .../org/apache/cxf/metrics/MetricsFeature.java | 3 + .../org/apache/cxf/metrics/MetricsProvider.java | 1 + .../codahale/CodahaleMetricsProvider.java | 9 +++ .../AbstractMetricsInterceptor.java | 74 +--- .../MetricsMessageClientOutInterceptor.java | 5 +- .../MetricsMessageInPreInvokeInterceptor.java | 10 ++- .../AbstractMessageResponseTimeInterceptor.java | 4 +- 7 files changed, 84 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/3cf19538/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java -- diff --git a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java index df31225..60fe71b 100644 --- a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java +++ b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java @@ -44,6 +44,9 @@ public class MetricsFeature extends AbstractFeature { public MetricsFeature() { this.providers = null; } +public MetricsFeature(MetricsProvider provider) { +this.providers = new MetricsProvider[] {provider}; +} public MetricsFeature(MetricsProvider ... providers) { this.providers = providers.length > 0 ? providers : null; } http://git-wip-us.apache.org/repos/asf/cxf/blob/3cf19538/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsProvider.java -- diff --git a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsProvider.java b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsProvider.java index e2bb994..0184723 100644 --- a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsProvider.java +++ b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsProvider.java @@ -32,4 +32,5 @@ public interface MetricsProvider { MetricsContext createOperationContext(Endpoint endpoint, BindingOperationInfo boi, boolean asClient, String cid); +MetricsContext createResourceContext(Endpoint endpoint, String resourceName, boolean asClient, String cid); } http://git-wip-us.apache.org/repos/asf/cxf/blob/3cf19538/rt/features/metrics/src/main/java/org/apache/cxf/metrics/codahale/CodahaleMetricsProvider.java -- diff --git a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/codahale/CodahaleMetricsProvider.java b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/codahale/CodahaleMetricsProvider.java index 6e520c9..3858032 100644 --- a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/codahale/CodahaleMetricsProvider.java +++ b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/codahale/CodahaleMetricsProvider.java @@ -133,4 +133,13 @@ public class CodahaleMetricsProvider implements MetricsProvider { return new CodahaleMetricsContext(buffer.toString(), registry); } +/** {@inheritDoc}*/ +@Override +public MetricsContext createResourceContext(Endpoint endpoint, String resourceName, +boolean asClient, String clientId) { +StringBuilder buffer = getBaseServiceName(endpoint, asClient, clientId); +buffer.append("Operation=").append(resourceName).append(','); +return new CodahaleMetricsContext(buffer.toString(), registry); +} + } http://git-wip-us.apache.org/repos/asf/cxf/blob/3cf19538/rt/features/metrics/src/main/java/org/apache/cxf/metrics/interceptors/AbstractMetricsInterceptor.java -- diff --git a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/interceptors/AbstractMetricsInterceptor.java b/rt/features/metrics/src/main/java/org/apache/cxf/metrics/interceptors/AbstractMetricsInterceptor.java index 6955866..e885163 100644 --- a/rt/features/metrics/src/main/java/org/apache/cxf/metrics/interceptors/AbstractMetricsInterceptor.java +++ b/rt/features/metrics/src/main/java/org/apache/