8296183: jndiprovider.properties contains properties pointing to non-existing classes#29712
8296183: jndiprovider.properties contains properties pointing to non-existing classes#29712jaikiran wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
|
@jaikiran This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
dfuch
left a comment
There was a problem hiding this comment.
Generally looks good to me. Good to avoid those unneeded CNFE. If backported, some more checks might be required on JDK 8 - as CORBA is still supported there.
| * @see PersistentSearchControl | ||
| * @see com.sun.jndi.ldap.ctl.ResponseControlFactory ResponseControlFactory | ||
| * @author Vincent Ryan | ||
| */ |
There was a problem hiding this comment.
Not that it matters much, but I see that DefaultResponseControlFactory and PersistentSearchControl both have an @see EntryChangeResponseControl so I'd suggest to replace:
- * @see com.sun.jndi.ldap.ctl.ResponseControlFactory ResponseControlFactory
+ * @see DefaultResponseControlFactory
There was a problem hiding this comment.
That's a good point, I've updated the PR accordingly.
dfuch
left a comment
There was a problem hiding this comment.
Would be good to get @AlekseiEfimov approval before integrating.
It seems these classes were never part of the JDK. Software vendors required Booster pack has the following packages:
The packages I suspect the classes of package The booster pack is also available on Maven repository [3]. If you want to look at the booster pack’s source code, it’s included in GlassFish 5 [4]. [1] : https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#7110-jndi-1.2.1-oth-JPR |
Can I please get a review of this change which removes the unused
src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.propertiesfile? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183.This
jndiprovider.propertiesfile lists 3 propertiesjava.naming.factory.control,java.naming.factory.objectandjava.naming.factory.state. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured incom/sun/jndi/ldap/jndiprovider.propertiesfor each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). Thejndiprovier.propertiesgets looked up by an JDK internal class in thejava.namingmodule -com.sun.naming.internal.ResourceManager. TheResourceManager.getFactories(...)method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc ofResourceManager.getFactories(...)says this:The implementation of
ResourceManager.getFactories(...)matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in thecom/sun/jndi/ldap/jndiprovider.propertieshas gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that aClassNotFoundExceptiongets raised (and ignored) for the classes referenced in thatjnidprovider.propertiesfile.The commit in this PR removes the
jndiprovier.properties. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29712/head:pull/29712$ git checkout pull/29712Update a local copy of the PR:
$ git checkout pull/29712$ git pull https://git.openjdk.org/jdk.git pull/29712/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29712View PR using the GUI difftool:
$ git pr show -t 29712Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29712.diff
Using Webrev
Link to Webrev Comment