eclipse-ee4j / eclipse-ee4j/jaxb-fi

SAXDocumentParser does not support custom encoding algorithms

Open
#32 4 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
Component: core ERR: Assignee Priority: Major Type: Improvement
Dominant language
Java
Stars
12
Forks
9
Avg merge
1d 15h
Merged PRs (30d)
3

Description

Hi,

during construction, the AttributeHolder is initialized with empty
_registeredEncodingAlgorithms. Registering custom encoding algorithms later,
will not affect the AttributeHolder and thus prevents string serialization for
generic SAX string interfaces.

A workaround is to derive from SAXDocumentParser and override
setRegisteredEncodingAlgorithms, i.e:

public class X3DFIDocumentParser extends SAXDocumentParser {

@Override
public void setRegisteredEncodingAlgorithms(Map algorithms) {
super.setRegisteredEncodingAlgorithms(algorithms);
this._attributes = new AttributesHolder(this.getRegisteredEncodingAlgorithms());
}
}

Could also be the solution for this issue.

Best regards,
Kristian
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[current]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.