Skip to content

Defensive reference to JNDI API for JDK 9+ (optional java.naming module) #27483

Closed
@jhoeller

Description

@jhoeller

Following up on #26884 (comment), our optional JNDI support for injection points - and therefore the java.naming module on JDK 9+ - is being referenced in two common places: CommonAnnotationBeanPostProcessor and StandardServletEnvironment. Since we're only really referring to JNDI API types such as javax.naming.NamingException through our own support classes, we can easily make this defensive with a reflective jndiPresent check before touching our actual JNDI support classes.

While java.naming is a minor concern on 5.3.x (where the much larger java.desktop is still a required module as well), this is easy enough to address there, in preparation for a more significant benefit in 6.0 (#26884).

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions