You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/06/30 23:25:52 UTC
cxf git commit: [CXF-6480] Avoiding NPE
Repository: cxf
Updated Branches:
refs/heads/master 81bc682a4 -> 4e1149ce5
[CXF-6480] Avoiding NPE
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4e1149ce
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4e1149ce
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4e1149ce
Branch: refs/heads/master
Commit: 4e1149ce5ee48723719305c68e00ec6f2d1e475e
Parents: 81bc682a
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Tue Jun 30 22:25:37 2015 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Tue Jun 30 22:25:37 2015 +0100
----------------------------------------------------------------------
.../org/apache/cxf/jaxrs/utils/InjectionUtils.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/4e1149ce/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
index 279f6a3..9491129 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
@@ -1010,12 +1010,15 @@ public final class InjectionUtils {
} else if (SERVLET_CONFIG_CLASS_NAME.equals(name)) {
proxyClassName = "org.apache.cxf.jaxrs.impl.tl.ThreadLocalServletConfig";
}
- try {
- return (ThreadLocalProxy<?>)ClassLoaderUtils.loadClass(proxyClassName, InjectionUtils.class)
- .newInstance();
- } catch (Throwable t) {
- throw new RuntimeException(t);
+ if (proxyClassName != null) {
+ try {
+ return (ThreadLocalProxy<?>)ClassLoaderUtils.loadClass(proxyClassName, InjectionUtils.class)
+ .newInstance();
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
}
+ return null;
}
public static Method getGetterFromSetter(Method setter) throws Exception {