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

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


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

commit 6616d84ddf978293b5bdfb6bd83eefb137b03d80
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 e35538bf36..8a6184438d 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