CAMEL-6957 CxfEndpoint setServiceClass should check the empty String
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c94a5391 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c94a5391 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c94a5391 Branch: refs/heads/camel-2.11.x Commit: c94a539189e64f313a703d1154d120c5f9dfe3a1 Parents: 4e3302f Author: Willem Jiang <willem.ji...@gmail.com> Authored: Wed Nov 13 15:22:28 2013 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Wed Nov 13 15:56:31 2013 +0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c94a5391/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java index 88cdda6..7003723 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java @@ -661,6 +661,9 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy } public void setServiceClass(String type) throws ClassNotFoundException { + if (ObjectHelper.isEmpty(type)) { + throw new IllegalArgumentException("The serviceClass option should not be set with Emptye String."); + } serviceClass = ClassLoaderUtils.loadClass(resolvePropertyPlaceholders(type), getClass()); }