[
https://issues.apache.org/jira/browse/CXF-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326076#comment-16326076
]
ASF GitHub Bot commented on CXF-7520:
-------------------------------------
jimma commented on issue #365: [CXF-7520]:Ensure CXF can build with JDK9
GA(build 9+181)
URL: https://github.com/apache/cxf/pull/365#issuecomment-357637819
@ffang Looks we have to add our customized MininumEscpapeHandler to write a
empty string like
```
public class CXFMinimumEscapeHandler implements CharacterEscapeHandler {
private CXFMinimumEscapeHandler() {
}
public static final CharacterEscapeHandler HANDLER = new
CXFMinimumEscapeHandler();
public void escape(char[] ch, int start, int length, boolean isAttVal,
Writer out) throws IOException {
if (length == 0 && start == 0) {
out.write(ch[start]);
return;
} else {
MinimumEscapeHandler.theInstance.escape(ch, start, length,
isAttVal, out);
}
}
}
```
Besides this new class, we need to add another method in JAXBUtil to set
escape handler property to Marshaller. Then DataWriterImpl and
AbstractJAXBProvider can both invoke this util method to set customized escape
handler after marshaller created. To support jdk's internal jaxb class, we may
need to create a minimum escape handler class with asm like what we did for
NamespaceMapper. Do you think this will fix all the things ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Ensure CXF can build with JDK9 GA(build 9+181)
> ----------------------------------------------
>
> Key: CXF-7520
> URL: https://issues.apache.org/jira/browse/CXF-7520
> Project: CXF
> Issue Type: Bug
> Reporter: Freeman Fang
> Assignee: Freeman Fang
> Priority: Major
> Fix For: 3.2.2
>
>
> a couple of cxf test failied with JDK9 GA due to recent change
> Mainly in JAXB and SAAJ
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)