Defensive reference to JNDI API for JDK 9+ (optional java.naming
module)
#27483
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
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
andStandardServletEnvironment
. Since we're only really referring to JNDI API types such asjavax.naming.NamingException
through our own support classes, we can easily make this defensive with a reflectivejndiPresent
check before touching our actual JNDI support classes.While
java.naming
is a minor concern on 5.3.x (where the much largerjava.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).The text was updated successfully, but these errors were encountered: