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

houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new f306c1397d8 SOLR-17718: Upgrade bytebuddy to 1.17.4 (#3286)
f306c1397d8 is described below

commit f306c1397d8ccb96b12e5c8331ee4c48b0f0e748
Author: Houston Putman <[email protected]>
AuthorDate: Tue Mar 25 17:00:09 2025 -0500

    SOLR-17718: Upgrade bytebuddy to 1.17.4 (#3286)
    
    Fixes cross-dc and cross-dc-manager tests when running with Java 25
    
    (cherry picked from commit 13f0fee15880adc859cb5bab50a8dabe22d173e1)
---
 solr/cross-dc-manager/build.gradle              | 11 ++++++++++-
 solr/licenses/byte-buddy-1.15.11.jar.sha1       |  1 -
 solr/licenses/byte-buddy-1.17.4.jar.sha1        |  1 +
 solr/licenses/byte-buddy-agent-1.15.11.jar.sha1 |  1 -
 solr/licenses/byte-buddy-agent-1.17.4.jar.sha1  |  1 +
 solr/modules/cross-dc/build.gradle              | 11 ++++++++++-
 versions.lock                                   |  4 ++--
 versions.props                                  |  1 +
 8 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/solr/cross-dc-manager/build.gradle 
b/solr/cross-dc-manager/build.gradle
index b6cc162525e..0cb46bf58b9 100644
--- a/solr/cross-dc-manager/build.gradle
+++ b/solr/cross-dc-manager/build.gradle
@@ -48,7 +48,16 @@ dependencies {
   testImplementation 'org.apache.lucene:lucene-test-framework'
   testImplementation 
'com.carrotsearch.randomizedtesting:randomizedtesting-runner'
   testImplementation 'junit:junit'
-  testImplementation 'org.mockito:mockito-core'
+  // The explicit dependency on bytebuddy is required for Java 25 support
+  // Once Mockito upgrades its dependency on ByteBuddy to 1.16.1, we should
+  // be able to remove this and merely use:
+  //   testImplementation 'org.mockito:mockito-core'
+  testImplementation('org.mockito:mockito-core', {
+    exclude group: "net.bytebuddy", module: "byte-buddy"
+    exclude group: "net.bytebuddy", module: "byte-buddy-agent"
+  })
+  testRuntimeOnly 'net.bytebuddy:byte-buddy'
+  testRuntimeOnly 'net.bytebuddy:byte-buddy-agent'
 
   testImplementation 'org.apache.kafka:kafka-streams:3.7.1:test'
   testImplementation 'org.apache.kafka:kafka-clients:3.7.1:test'
diff --git a/solr/licenses/byte-buddy-1.15.11.jar.sha1 
b/solr/licenses/byte-buddy-1.15.11.jar.sha1
deleted file mode 100644
index db27b6a09ef..00000000000
--- a/solr/licenses/byte-buddy-1.15.11.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f61886478e0f9ee4c21d09574736f0ff45e0a46c
diff --git a/solr/licenses/byte-buddy-1.17.4.jar.sha1 
b/solr/licenses/byte-buddy-1.17.4.jar.sha1
new file mode 100644
index 00000000000..1ce022efb40
--- /dev/null
+++ b/solr/licenses/byte-buddy-1.17.4.jar.sha1
@@ -0,0 +1 @@
+ffb8488d93290eff074fb542a596e4c5a26d0315
diff --git a/solr/licenses/byte-buddy-agent-1.15.11.jar.sha1 
b/solr/licenses/byte-buddy-agent-1.15.11.jar.sha1
deleted file mode 100644
index 1943ee37a7d..00000000000
--- a/solr/licenses/byte-buddy-agent-1.15.11.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a38b16385e867f59a641330f0362ebe742788ed8
diff --git a/solr/licenses/byte-buddy-agent-1.17.4.jar.sha1 
b/solr/licenses/byte-buddy-agent-1.17.4.jar.sha1
new file mode 100644
index 00000000000..ebc431ad92b
--- /dev/null
+++ b/solr/licenses/byte-buddy-agent-1.17.4.jar.sha1
@@ -0,0 +1 @@
+9dd4f0adf859ffc402508141fcbe940551ffa3b6
diff --git a/solr/modules/cross-dc/build.gradle 
b/solr/modules/cross-dc/build.gradle
index 44143285d08..41db0bbc664 100644
--- a/solr/modules/cross-dc/build.gradle
+++ b/solr/modules/cross-dc/build.gradle
@@ -43,8 +43,17 @@ dependencies {
   testImplementation 'org.apache.lucene:lucene-test-framework'
   testImplementation 'junit:junit'
   testImplementation 'commons-io:commons-io'
-  testImplementation 'org.mockito:mockito-core'
   testImplementation 
'com.carrotsearch.randomizedtesting:randomizedtesting-runner'
+  // The explicit dependency on bytebuddy is required for Java 25 support
+  // Once Mockito upgrades its dependency on ByteBuddy to 1.16.1, we should
+  // be able to remove this and merely use:
+  //   testImplementation 'org.mockito:mockito-core'
+  testImplementation('org.mockito:mockito-core', {
+    exclude group: "net.bytebuddy", module: "byte-buddy"
+    exclude group: "net.bytebuddy", module: "byte-buddy-agent"
+  })
+  testRuntimeOnly 'net.bytebuddy:byte-buddy'
+  testRuntimeOnly 'net.bytebuddy:byte-buddy-agent'
 
   testImplementation "org.apache.kafka:kafka-clients:3.7.1:test"
 }
diff --git a/versions.lock b/versions.lock
index 8b7cbb7e955..1a75598e16b 100644
--- a/versions.lock
+++ b/versions.lock
@@ -466,8 +466,8 @@ io.opentracing:opentracing-mock:0.33.0 (1 constraints: 
3805343b)
 jakarta.servlet:jakarta.servlet-api:4.0.4 (1 constraints: 961568b9)
 jakarta.websocket:jakarta.websocket-api:1.1.2 (1 constraints: 92155ab9)
 javax.inject:javax.inject:1 (1 constraints: 7a0df617)
-net.bytebuddy:byte-buddy:1.15.11 (1 constraints: 730bb5e9)
-net.bytebuddy:byte-buddy-agent:1.15.11 (1 constraints: 730bb5e9)
+net.bytebuddy:byte-buddy:1.17.4 (2 constraints: b11080dc)
+net.bytebuddy:byte-buddy-agent:1.17.4 (1 constraints: 3f05423b)
 net.minidev:accessors-smart:2.4.9 (1 constraints: 500a92b8)
 net.minidev:json-smart:2.4.10 (1 constraints: 400e9a7c)
 no.nav.security:mock-oauth2-server:0.5.10 (1 constraints: 3805333b)
diff --git a/versions.props b/versions.props
index d291ad62668..e6ef5ff3d95 100644
--- a/versions.props
+++ b/versions.props
@@ -32,6 +32,7 @@ io.prometheus:*=0.16.0
 io.swagger.core.v3:*=2.2.22
 jakarta.ws.rs:jakarta.ws.rs-api=3.1.0
 junit:junit=4.13.2
+net.bytebuddy:*=1.17.4
 net.thisptr:jackson-jq=0.0.13
 no.nav.security:mock-oauth2-server=0.5.10
 org.apache.calcite.avatica:avatica-core=1.25.0

Reply via email to