Fix #11902 undeprecate addHiddenClasses(Attributes, String...) #11903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11902
Due to the current implementation of the JettyXmlConfiguration favouring methods with interface args, this means that the deprecated method
addHiddenClasses
method is in fact always called, leading to this log line during jetty startup:2024-06-09 13:09:20,602 - WARN [org.eclipse.jetty.xml.XmlConfiguration:800] - Deprecated method public static void org.eclipse.jetty.ee.WebAppClassLoading.addHiddenClasses(org.eclipse.jetty.util.Attributes,java.lang.String[]) in file:///opt/jetty/etc/jetty-ee-webapp.xml
The real fix is to modify
JettyXmlConfiguration
to change the ordering in which it considers the methods to apply, and #11895 has been opened for that. That fix is risky, so therefore, the quickest route to removing this unnessary log line is to simply undeprecate the method.