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

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


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

commit 0ca37c37325c6bc6f0fce4ed4a5c9c5ddfc14c79
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 116840b4795..4dca82a695c 100644
--- a/buildtools/pom.xml
+++ b/buildtools/pom.xml
@@ -46,6 +46,7 @@
     
<project.build.outputTimestamp>2025-04-09T09:09:37Z</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.18.0</log4j2.version>
     <slf4j.version>1.7.32</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