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
commit 22d196bb9fb3aca5d9645becf650e14a14be6cd4 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jun 15 09:35:04 2022 +0100 Ensure version error is reported correctly for Native 1.2.33 and earlier --- java/org/apache/tomcat/jni/FileInfo.java | 30 ++++++++++++++++++++++++++++++ java/org/apache/tomcat/jni/Sockaddr.java | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/java/org/apache/tomcat/jni/FileInfo.java b/java/org/apache/tomcat/jni/FileInfo.java new file mode 100644 index 0000000000..ff807e4a60 --- /dev/null +++ b/java/org/apache/tomcat/jni/FileInfo.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.jni; + +/** + * Tomcat Native 1.2.33 and earlier won't initialise unless this class is + * present. This dummy class ensures initialisation gets as far as being able to + * check the version of the Tomcat Native library and reporting a version error + * if 1.2.33 or earlier is present. + */ +public class FileInfo { + + private FileInfo() { + // Hide default constructor + } +} diff --git a/java/org/apache/tomcat/jni/Sockaddr.java b/java/org/apache/tomcat/jni/Sockaddr.java new file mode 100644 index 0000000000..20e73c8ad2 --- /dev/null +++ b/java/org/apache/tomcat/jni/Sockaddr.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.jni; + +/** + * Tomcat Native 1.2.33 and earlier won't initialise unless this class is + * present. This dummy class ensures initialisation gets as far as being able to + * check the version of the Tomcat Native library and reporting a version error + * if 1.2.33 or earlier is present. + */ +public class Sockaddr { + + private Sockaddr() { + // Hide default constructor + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org