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

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 98943df20e20b4d7320d433f3090606dec600b2f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Oct 1 12:54:00 2019 +0100

    Add logging
---
 java/org/apache/tomcat/util/compat/Jre9Compat.java         | 4 +++-
 java/org/apache/tomcat/util/compat/LocalStrings.properties | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre9Compat.java 
b/java/org/apache/tomcat/util/compat/Jre9Compat.java
index a7a368e..7ad6f66 100644
--- a/java/org/apache/tomcat/util/compat/Jre9Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre9Compat.java
@@ -103,9 +103,11 @@ class Jre9Compat extends Jre8Compat {
             o15 = majorMethod.invoke(o14);
 
         } catch (ClassNotFoundException e) {
-            // Must be Java 8
+            // Must be pre-Java 9
+            log.debug(sm.getString("jre9Compat.javaPre9"), e);
         } catch (ReflectiveOperationException | IllegalArgumentException e) {
             // Should never happen
+            log.error(sm.getString("jre9Compat.unexpected"), e);
         }
 
         inaccessibleObjectExceptionClazz = c1;
diff --git a/java/org/apache/tomcat/util/compat/LocalStrings.properties 
b/java/org/apache/tomcat/util/compat/LocalStrings.properties
index 5418804..7b89aa6 100644
--- a/java/org/apache/tomcat/util/compat/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/compat/LocalStrings.properties
@@ -14,6 +14,8 @@
 # limitations under the License.
 
 jre9Compat.invalidModuleUri=The module URI provided [{0}] could not be 
converted to a URL for the JarScanner to process
+jre9Compat.javaPre9=Class not found so assuming code is running on a pre-Java 
9 JVM
+jre9Compat.unexpected=Failed to create references to Java 9 classes and methods
 
 jreCompat.noApplicationProtocol=Java Runtime does not support 
SSLEngine.getApplicationProtocol(). You must use Java 9 to use this feature.
 jreCompat.noApplicationProtocols=Java Runtime does not support 
SSLParameters.setApplicationProtocols(). You must use Java 9 to use this 
feature.


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

Reply via email to