jakartaee / jakartaee/jaxb-api

JavaType/hasNsContext not supported

Open
#255 7 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
enhancement Major
Dominant language
Java
Stars
79
Forks
48
Avg merge
7h 12m
Merged PRs (30d)
2

Description

The Customization property JavaType/hasNsContext is not supported. I did not
check, whether this property is still in the specification, but it was in the
specification for JAXB 1, and its still documented, for example on

[https://jaxb.dev.java.net/nonav/2.0/binding-customization/](https://jaxb.dev.java.net/nonav/2.0/binding-customization/)
(JAXB Customization Reference)

or

[http://java.sun.com/javaee/5/docs/tutorial/doc/bnbbf.html#bnbbv](http://java.sun.com/javaee/5/docs/tutorial/doc/bnbbf.html#bnbbv)
(Java EE 5 tutorial)

so I was hoping that this attribute would still be valid.

Setting this property to true or false, doesn't affect the generated sources at
all. The defect seems to be by design, because the implementation of JavaType
works by creating an implementation of XmlAdapter and this interface offers no
possibility to obtain an NsContext.

If there is no other possibility, it would help to have at least a workaround.
For example, I could imagine that the RI allows to obtain an NsContext from some
ThreadLocal variable, or something like that.
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[2.0.2]

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.