This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 3ad51c1251 Code clean-up. Formatting. No functional change.
3ad51c1251 is described below
commit 3ad51c12514698fad04e5fc653f41a5fecea3d28
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jan 16 15:53:16 2025 +0000
Code clean-up. Formatting. No functional change.
---
java/org/apache/tomcat/util/compat/Jre19Compat.java | 8 +++-----
java/org/apache/tomcat/util/compat/JrePlatform.java | 9 ++++-----
java/org/apache/tomcat/util/compat/JreVendor.java | 8 +++-----
3 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/java/org/apache/tomcat/util/compat/Jre19Compat.java
b/java/org/apache/tomcat/util/compat/Jre19Compat.java
index 60ee0c2dc1..26cca197b5 100644
--- a/java/org/apache/tomcat/util/compat/Jre19Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre19Compat.java
@@ -68,11 +68,9 @@ public class Jre19Compat extends JreCompat {
return null;
}
- if (task!= null && task.getClass().getCanonicalName() != null &&
- (task.getClass().getCanonicalName().equals(
-
"org.apache.tomcat.util.threads.ThreadPoolExecutor.Worker") ||
- task.getClass().getCanonicalName().equals(
-
"java.util.concurrent.ThreadPoolExecutor.Worker"))) {
+ if (task != null && task.getClass().getCanonicalName() != null &&
(task.getClass().getCanonicalName()
+
.equals("org.apache.tomcat.util.threads.ThreadPoolExecutor.Worker") ||
+
task.getClass().getCanonicalName().equals("java.util.concurrent.ThreadPoolExecutor.Worker")))
{
Field executorField =
task.getClass().getDeclaredField("this$0");
executorField.setAccessible(true);
result = executorField.get(task);
diff --git a/java/org/apache/tomcat/util/compat/JrePlatform.java
b/java/org/apache/tomcat/util/compat/JrePlatform.java
index b0db4f3797..f6babbb22e 100644
--- a/java/org/apache/tomcat/util/compat/JrePlatform.java
+++ b/java/org/apache/tomcat/util/compat/JrePlatform.java
@@ -24,12 +24,11 @@ public class JrePlatform {
static {
/*
- * There are a few places where a) the behaviour of the Java API
depends
- * on the underlying platform and b) those behavioural differences have
- * an impact on Tomcat.
+ * There are a few places where a) the behaviour of the Java API
depends on the underlying platform and b) those
+ * behavioural differences have an impact on Tomcat.
*
- * Tomcat therefore needs to be able to determine the platform it is
- * running on to account for those differences.
+ * Tomcat therefore needs to be able to determine the platform it is
running on to account for those
+ * differences.
*
* In an ideal world this code would not exist.
*/
diff --git a/java/org/apache/tomcat/util/compat/JreVendor.java
b/java/org/apache/tomcat/util/compat/JreVendor.java
index caa0823ea8..2aea102bd6 100644
--- a/java/org/apache/tomcat/util/compat/JreVendor.java
+++ b/java/org/apache/tomcat/util/compat/JreVendor.java
@@ -22,11 +22,9 @@ public class JreVendor {
static {
/*
- * There are a few places where Tomcat either accesses JVM internals
- * (e.g. the memory leak protection) or where feature support varies
- * between JVMs (e.g. SPNEGO). These flags exist to enable Tomcat to
- * adjust its behaviour based on the vendor of the JVM. In an ideal
- * world this code would not exist.
+ * There are a few places where Tomcat either accesses JVM internals
(e.g. the memory leak protection) or where
+ * feature support varies between JVMs (e.g. SPNEGO). These flags
exist to enable Tomcat to adjust its behaviour
+ * based on the vendor of the JVM. In an ideal world this code would
not exist.
*/
String vendor = System.getProperty("java.vendor", "");
vendor = vendor.toLowerCase(Locale.ENGLISH);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]