Un-deprecate WebAppClassLoading.addHiddenClasses(Attributes attributes, String... patterns) method
janbartel opened this issue · comments
Jetty 12
The following method on o.e.j.ee.WebAppClassLoading
was deprecated in jetty-12.0.9:
@Deprecated (since = "12.0.9", forRemoval = true)
public static void addHiddenClasses(Attributes attributes, String... patterns)
in favour of this method:
public static void addHiddenClasses(Server server, String... patterns)
We have this in jetty-ee-web.xml
file in core:
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addHiddenClasses">
<Arg><Ref refid="Server"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
<Arg><Property name="jetty.server.addHiddenClasses"/></Arg>
</Call>
</Arg>
</Call>
Due to the current implementation of the JettyXmlConfiguration
favouring methods with interface args, this means that the deprecated 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
I've opened this issue to modify JettyXmlConfiguration
: #11895 however the fix is risky. Therefore, the quickest route to removing this unnessary log line is to simply undeprecate the method.