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 f3bc9506bf Remove deprecated, unused code
f3bc9506bf is described below

commit f3bc9506bf48192804b20a566d3c8cec0755262f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue May 31 19:50:25 2022 +0100

    Remove deprecated, unused code
---
 java/org/apache/tomcat/jni/Library.java | 120 --------------------------------
 1 file changed, 120 deletions(-)

diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index fced9180ed..4461724a54 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -108,11 +108,7 @@ public final class Library {
      */
     public static native void terminate();
     /* Internal function for loading APR Features */
-    private static native boolean has(int what);
-    /* Internal function for loading APR Features */
     private static native int version(int what);
-    /* Internal function for loading APR sizes */
-    private static native int size(int what);
 
     /* TCN_MAJOR_VERSION */
     public static int TCN_MAJOR_VERSION  = 0;
@@ -136,88 +132,6 @@ public final class Library {
     /* APR_VERSION_STRING */
     public static native String aprVersionString();
 
-    /*  APR Feature Macros */
-    @Deprecated
-    public static boolean APR_HAVE_IPV6           = false;
-    @Deprecated
-    public static boolean APR_HAS_SHARED_MEMORY   = false;
-    @Deprecated
-    public static boolean APR_HAS_THREADS         = false;
-    @Deprecated
-    public static boolean APR_HAS_SENDFILE        = false;
-    @Deprecated
-    public static boolean APR_HAS_MMAP            = false;
-    @Deprecated
-    public static boolean APR_HAS_FORK            = false;
-    @Deprecated
-    public static boolean APR_HAS_RANDOM          = false;
-    @Deprecated
-    public static boolean APR_HAS_OTHER_CHILD     = false;
-    @Deprecated
-    public static boolean APR_HAS_DSO             = false;
-    @Deprecated
-    public static boolean APR_HAS_SO_ACCEPTFILTER = false;
-    @Deprecated
-    public static boolean APR_HAS_UNICODE_FS      = false;
-    @Deprecated
-    public static boolean APR_HAS_PROC_INVOKED    = false;
-    @Deprecated
-    public static boolean APR_HAS_USER            = false;
-    @Deprecated
-    public static boolean APR_HAS_LARGE_FILES     = false;
-    @Deprecated
-    public static boolean APR_HAS_XTHREAD_FILES   = false;
-    @Deprecated
-    public static boolean APR_HAS_OS_UUID         = false;
-    /* Are we big endian? */
-    @Deprecated
-    public static boolean APR_IS_BIGENDIAN        = false;
-    /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
-     * to poll on files/pipes.
-     */
-    @Deprecated
-    public static boolean APR_FILES_AS_SOCKETS    = false;
-    /* This macro indicates whether or not EBCDIC is the native character set.
-     */
-    @Deprecated
-    public static boolean APR_CHARSET_EBCDIC      = false;
-    /* Is the TCP_NODELAY socket option inherited from listening sockets?
-     */
-    @Deprecated
-    public static boolean APR_TCP_NODELAY_INHERITED = false;
-    /* Is the O_NONBLOCK flag inherited from listening sockets?
-     */
-    @Deprecated
-    public static boolean APR_O_NONBLOCK_INHERITED  = false;
-    /* Poll operations are interruptable by apr_pollset_wakeup().
-     */
-    @Deprecated
-    public static boolean APR_POLLSET_WAKEABLE      = false;
-    /* Support for Unix Domain Sockets.
-     */
-    @Deprecated
-    public static boolean APR_HAVE_UNIX             = false;
-
-
-    @Deprecated
-    public static int APR_SIZEOF_VOIDP;
-    @Deprecated
-    public static int APR_PATH_MAX;
-    @Deprecated
-    public static int APRMAXHOSTLEN;
-    @Deprecated
-    public static int APR_MAX_IOVEC_SIZE;
-    @Deprecated
-    public static int APR_MAX_SECS_TO_LINGER;
-    @Deprecated
-    public static int APR_MMAP_THRESHOLD;
-    @Deprecated
-    public static int APR_MMAP_LIMIT;
-
-    /* return global TCN's APR pool */
-    @Deprecated
-    public static native long globalPool();
-
     /**
      * Setup any APR internal data structures.  This MUST be the first function
      * called for any APR library.
@@ -244,44 +158,10 @@ public final class Library {
             APR_PATCH_VERSION  = version(0x13);
             APR_IS_DEV_VERSION = version(0x14);
 
-            APR_SIZEOF_VOIDP        = size(1);
-            APR_PATH_MAX            = size(2);
-            APRMAXHOSTLEN           = size(3);
-            APR_MAX_IOVEC_SIZE      = size(4);
-            APR_MAX_SECS_TO_LINGER  = size(5);
-            APR_MMAP_THRESHOLD      = size(6);
-            APR_MMAP_LIMIT          = size(7);
-
-            APR_HAVE_IPV6           = has(0);
-            APR_HAS_SHARED_MEMORY   = has(1);
-            APR_HAS_THREADS         = has(2);
-            APR_HAS_SENDFILE        = has(3);
-            APR_HAS_MMAP            = has(4);
-            APR_HAS_FORK            = has(5);
-            APR_HAS_RANDOM          = has(6);
-            APR_HAS_OTHER_CHILD     = has(7);
-            APR_HAS_DSO             = has(8);
-            APR_HAS_SO_ACCEPTFILTER = has(9);
-            APR_HAS_UNICODE_FS      = has(10);
-            APR_HAS_PROC_INVOKED    = has(11);
-            APR_HAS_USER            = has(12);
-            APR_HAS_LARGE_FILES     = has(13);
-            APR_HAS_XTHREAD_FILES   = has(14);
-            APR_HAS_OS_UUID         = has(15);
-            APR_IS_BIGENDIAN        = has(16);
-            APR_FILES_AS_SOCKETS    = has(17);
-            APR_CHARSET_EBCDIC      = has(18);
-            APR_TCP_NODELAY_INHERITED = has(19);
-            APR_O_NONBLOCK_INHERITED  = has(20);
-            APR_POLLSET_WAKEABLE      = has(21);
-            APR_HAVE_UNIX             = has(22);
             if (APR_MAJOR_VERSION < 1) {
                 throw new UnsatisfiedLinkError("Unsupported APR Version (" +
                                                aprVersionString() + ")");
             }
-            if (!APR_HAS_THREADS) {
-                throw new UnsatisfiedLinkError("Missing threading support from 
APR");
-            }
         }
         return initialize();
     }


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

Reply via email to