This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 552cf5e5f4 No need for reflection here
552cf5e5f4 is described below

commit 552cf5e5f4353911341407a3d2ca5b255d705648
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 8 18:22:35 2024 +0000

    No need for reflection here
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 5543194084..fb93d96b5a 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -169,11 +168,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
     }
 
-    private static void terminateAPR()
-            throws ClassNotFoundException, NoSuchMethodException, 
IllegalAccessException, InvocationTargetException {
-        String methodName = "terminate";
-        Method method = 
Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, (Class[]) 
null);
-        method.invoke(null, (Object[]) null);
+    private static void terminateAPR() {
+        Library.terminate();
         AprStatus.setAprAvailable(false);
         AprStatus.setAprInitialized(false);
         sslInitialized = false; // Well we cleaned the pool in terminate.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to