Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Java 22 features to PL/Java user code #480

Merged
merged 4 commits into from
Mar 31, 2024

Conversation

jcflack
Copy link
Contributor

@jcflack jcflack commented Mar 30, 2024

Provide access for client code to features introduced in Java 22.

The Java 2 release notes include new XML features that should be exposed by PL/Java's Adjusting.XML API so they can be used by client code.

One new feature is already sufficiently exposed by the setFirstSupportedProperty method, so only a documentation note is added.

jcflack added 4 commits March 27, 2024 15:01
The doc comment did not precisely describe the method's behavior
when an unexpected exception is passed to the onUnexpected handler.
Have allowDTD(boolean) try this new-with-Java-22 property
ahead of the older known properties used for the purpose.

The IGNORE mode is new and will need a new method (which,
of course, will only work on Java >= 22).
A new method ignoreDTD is added, which will only work on
Java 22 or later.

Regarding the added test, a truly minimal DTD, <!DOCTYPE a>, cannot be
ignored by Java 22's SAX/DOM parser (though it can be, when using the
StAX API). NullPointerException calling getActiveGrammar().isImmutable()
is the result. Reported on bugreport.java.com but still awaiting
assignment of a bug ID. The test added here uses an almost-minimal DTD
<!DOCTYPE a []> in which the empty internal subset is enough to avoid
the issue. (Including any externalID, even a dummy one, also works. Only
a completely minimal DTD fails.)
This property, new in Java 22, can simply be documented;
the existing setFirstSupportedProperty API method suffices
to configure it.
@jcflack jcflack merged commit 38e46db into REL1_6_STABLE Mar 31, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant