Repository: cxf Updated Branches: refs/heads/master de9c7ecd7 -> b49075882
[CXF-7166] NullPointerException at org.apache.cxf.common.jaxb.JAXBUtils.createJAXBContextProxy Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b4907588 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b4907588 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b4907588 Branch: refs/heads/master Commit: b49075882641fcebbbdf1ed8d84247fcf80aa558 Parents: de9c7ec Author: Alessio Soldano <[email protected]> Authored: Mon Dec 12 11:18:36 2016 +0100 Committer: Alessio Soldano <[email protected]> Committed: Mon Dec 12 11:23:02 2016 +0100 ---------------------------------------------------------------------- .../java/org/apache/cxf/common/jaxb/JAXBContextCache.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/b4907588/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java index d6393d2..dcbe9fc 100644 --- a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java +++ b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java @@ -69,11 +69,6 @@ public final class JAXBContextCache { this.classes = classes; ccas = new WeakReference<CachedContextAndSchemasInternal>(i); } - private CachedContextAndSchemas(CachedContextAndSchemasInternal i) { - this.context = i.getContext(); - this.classes = i.getClasses(); - ccas = new WeakReference<CachedContextAndSchemasInternal>(i); - } public JAXBContext getContext() { return context; } @@ -237,7 +232,8 @@ public final class JAXBContextCache { JAXBCONTEXT_CACHE.remove(cachedContextAndSchemasInternal.getClasses()); cachedContextAndSchemasInternal = null; } else { - return new CachedContextAndSchemas(cachedContextAndSchemasInternal); + return new CachedContextAndSchemas(context, cachedContextAndSchemasInternal.getClasses(), + cachedContextAndSchemasInternal); } } }
