You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/07/27 20:58:31 UTC
[tomcat] branch main updated: Silence a couple more deprecation
warnings
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new a535913 Silence a couple more deprecation warnings
a535913 is described below
commit a53591356d7302f556d8931fce01e74a2ec60e75
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 27 21:58:20 2021 +0100
Silence a couple more deprecation warnings
---
java/org/apache/catalina/loader/WebappClassLoaderBase.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index f3798c5..3b63625 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -2381,6 +2381,12 @@ public abstract class WebappClassLoaderBase extends URLClassLoader
*
* @return the loaded class, or null if the class isn't found
*/
+ /*
+ * The use of getPackage() is appropriate given that the code is checking
+ * if the package is sealed. Therefore, parent class loaders need to be
+ * checked.
+ */
+ @SuppressWarnings("deprecation")
protected Class<?> findClassInternal(String name) {
checkStateForResourceLoading(name);
@@ -2473,6 +2479,7 @@ public abstract class WebappClassLoaderBase extends URLClassLoader
int pos = name.lastIndexOf('.');
if (pos != -1) {
String packageName = name.substring(0, pos);
+
Package pkg = getPackage(packageName);
// Define the package (if null)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org