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

lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new c237ed58831 [fix][build] Ensure that buildtools is Java 8 compatible 
and fix remaining compatibility issue (#24307)
c237ed58831 is described below

commit c237ed5883186615903f7d37bc791776e2caa67b
Author: Lari Hotari <[email protected]>
AuthorDate: Thu May 15 13:24:03 2025 +0300

    [fix][build] Ensure that buildtools is Java 8 compatible and fix remaining 
compatibility issue (#24307)
    
    (cherry picked from commit 0e24f7a48c478420fb336d1ed5d8c76015492318)
---
 buildtools/pom.xml                                                      | 1 +
 .../main/java/org/apache/pulsar/tests/ThreadLeakDetectorListener.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildtools/pom.xml b/buildtools/pom.xml
index 8bcccb6491f..cf03624199c 100644
--- a/buildtools/pom.xml
+++ b/buildtools/pom.xml
@@ -46,6 +46,7 @@
     
<project.build.outputTimestamp>2025-04-09T09:11:45Z</project.build.outputTimestamp>
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
+    <maven.compiler.release>8</maven.compiler.release>
     <surefire.version>3.1.0</surefire.version>
     <log4j2.version>2.23.1</log4j2.version>
     <slf4j.version>2.0.13</slf4j.version>
diff --git 
a/buildtools/src/main/java/org/apache/pulsar/tests/ThreadLeakDetectorListener.java
 
b/buildtools/src/main/java/org/apache/pulsar/tests/ThreadLeakDetectorListener.java
index d28eabf238b..3708a867246 100644
--- 
a/buildtools/src/main/java/org/apache/pulsar/tests/ThreadLeakDetectorListener.java
+++ 
b/buildtools/src/main/java/org/apache/pulsar/tests/ThreadLeakDetectorListener.java
@@ -102,7 +102,7 @@ public class ThreadLeakDetectorListener extends 
BetweenTestClassesListenerAdapte
     private static String firstTestClassName(List<ITestClass> testClasses) {
         return testClasses.stream()
                 .findFirst()
-                .orElseThrow()
+                .get()
                 .getRealClass().getName();
     }
 

Reply via email to