Skip to content

Commit

Permalink
CXF-9007: NullPointerException in XMLStreamDataWriter.writeNode
Browse files Browse the repository at this point in the history
  • Loading branch information
reta committed May 9, 2024
1 parent 6658236 commit 2b2be1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,10 @@ public static DocumentFragment getDomDocumentFragment(DocumentFragment fragment)
//java9 plus hack
Field f = GET_DOCUMENT_FRAGMENT_FIELDS.get(fragment.getClass());
if (f != null) {
return ReflectionUtil.accessDeclaredField(f, fragment, DocumentFragment.class);
final DocumentFragment inner = ReflectionUtil.accessDeclaredField(f, fragment, DocumentFragment.class);
if (inner != null) {
return inner;
}
}
}
return fragment;
Expand Down

0 comments on commit 2b2be1d

Please sign in to comment.