Apache Solr open-source search software
Update dependency org.mockito:mockito-core to v5 (#1611)
Solr Bot313df7c491e9
diff --git a/gradle/testing/randomization/policies/solr-tests.policy b/gradle/testing/randomization/policies/solr-tests.policyindex d39a3818b98..9e594e1ffd7 100644--- a/gradle/testing/randomization/policies/solr-tests.policy+++ b/gradle/testing/randomization/policies/solr-tests.policy@@ -84,6 +84,11 @@ grant {permission java.lang.RuntimePermission "getStackWalkerWithClassReference";// needed by bytebuddypermission java.lang.RuntimePermission "defineClass";+ permission java.lang.RuntimePermission "net.bytebuddy.createJavaDispatcher";+ permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.method";+ permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.type";+ permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.dynamic.loading";+ permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.utility";// needed by mockitopermission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";permission java.lang.RuntimePermission "reflectionFactoryAccess";diff --git a/solr/core/build.gradle b/solr/core/build.gradleindex 9c5775f44dd..9406ce2df51 100644--- a/solr/core/build.gradle+++ b/solr/core/build.gradle@@ -200,6 +200,9 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })}diff --git a/solr/core/src/test/org/apache/solr/schema/SchemaWatcherTest.java b/solr/core/src/test/org/apache/solr/schema/SchemaWatcherTest.javaindex 9fbfee281ad..8016199b474 100644--- a/solr/core/src/test/org/apache/solr/schema/SchemaWatcherTest.java+++ b/solr/core/src/test/org/apache/solr/schema/SchemaWatcherTest.java@@ -19,7 +19,7 @@ package org.apache.solr.schema;import static org.mockito.Mockito.mock;import static org.mockito.Mockito.verify;-import static org.mockito.Mockito.verifyZeroInteractions;+import static org.mockito.Mockito.verifyNoInteractions;import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.schema.ZkIndexSchemaReader.SchemaWatcher;@@ -56,6 +56,6 @@ public class SchemaWatcherTest {schemaWatcher.process(new WatchedEvent(EventType.NodeDataChanged, KeeperState.SyncConnected, "/test"));// after discardReaderReference, SchemaWatcher should no longer hold a ref to the reader- verifyZeroInteractions(mockSchemaReader);+ verifyNoInteractions(mockSchemaReader);}}diff --git a/solr/licenses/byte-buddy-1.10.20.jar.sha1 b/solr/licenses/byte-buddy-1.10.20.jar.sha1deleted file mode 100644index b31ad1a9797..00000000000--- a/solr/licenses/byte-buddy-1.10.20.jar.sha1+++ /dev/null@@ -1 +0,0 @@-c5d2d12c75c5d52f8df33f4211e6dbd05a42b117diff --git a/solr/licenses/byte-buddy-1.14.4.jar.sha1 b/solr/licenses/byte-buddy-1.14.4.jar.sha1new file mode 100644index 00000000000..ebe20ed9c8b--- /dev/null+++ b/solr/licenses/byte-buddy-1.14.4.jar.sha1@@ -0,0 +1 @@+20498aaec9b00a5cfdb831e7bf68feafa833ce4bdiff --git a/solr/licenses/mockito-core-LICENSE-MIT.txt b/solr/licenses/mockito-LICENSE-MIT.txtsimilarity index 100%rename from solr/licenses/mockito-core-LICENSE-MIT.txtrename to solr/licenses/mockito-LICENSE-MIT.txtdiff --git a/solr/licenses/mockito-core-3.8.0.jar.sha1 b/solr/licenses/mockito-core-3.8.0.jar.sha1deleted file mode 100644index 0e89d395726..00000000000--- a/solr/licenses/mockito-core-3.8.0.jar.sha1+++ /dev/null@@ -1 +0,0 @@-a3f5ed0745e4d76aa880136ab514412cd50b6246diff --git a/solr/licenses/mockito-core-5.3.1.jar.sha1 b/solr/licenses/mockito-core-5.3.1.jar.sha1new file mode 100644index 00000000000..20fbd7b9134--- /dev/null+++ b/solr/licenses/mockito-core-5.3.1.jar.sha1@@ -0,0 +1 @@+7cac313592a29ae5e29c52c22b15c3ae5ab561b2diff --git a/solr/licenses/mockito-subclass-5.3.1.jar.sha1 b/solr/licenses/mockito-subclass-5.3.1.jar.sha1new file mode 100644index 00000000000..2ac9df036e3--- /dev/null+++ b/solr/licenses/mockito-subclass-5.3.1.jar.sha1@@ -0,0 +1 @@+52e60962a0eec67bfc5bcb5ae3a04c51f4589cc9diff --git a/solr/licenses/objenesis-3.1.jar.sha1 b/solr/licenses/objenesis-3.1.jar.sha1deleted file mode 100644index b0824738b99..00000000000--- a/solr/licenses/objenesis-3.1.jar.sha1+++ /dev/null@@ -1 +0,0 @@-48f12deaae83a8dfc3775d830c9fd60ea59bbbcadiff --git a/solr/licenses/objenesis-3.3.jar.sha1 b/solr/licenses/objenesis-3.3.jar.sha1new file mode 100644index 00000000000..47e59a63aeb--- /dev/null+++ b/solr/licenses/objenesis-3.3.jar.sha1@@ -0,0 +1 @@+1049c09f1de4331e8193e579448d0916d75b7631diff --git a/solr/modules/analysis-extras/build.gradle b/solr/modules/analysis-extras/build.gradleindex 1741cc17772..09398b4ac5b 100644--- a/solr/modules/analysis-extras/build.gradle+++ b/solr/modules/analysis-extras/build.gradle@@ -42,4 +42,7 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })}diff --git a/solr/modules/hadoop-auth/build.gradle b/solr/modules/hadoop-auth/build.gradleindex 6f0af582dbd..3bf7bfab75f 100644--- a/solr/modules/hadoop-auth/build.gradle+++ b/solr/modules/hadoop-auth/build.gradle@@ -81,6 +81,9 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })testImplementation 'commons-io:commons-io'diff --git a/solr/modules/jwt-auth/build.gradle b/solr/modules/jwt-auth/build.gradleindex abbf9582b44..3bed1606e4a 100644--- a/solr/modules/jwt-auth/build.gradle+++ b/solr/modules/jwt-auth/build.gradle@@ -50,6 +50,9 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })testImplementation('no.nav.security:mock-oauth2-server', {exclude group: "io.netty", module: "netty-all"})diff --git a/solr/modules/ltr/build.gradle b/solr/modules/ltr/build.gradleindex 96cce2b5d36..ba521258281 100644--- a/solr/modules/ltr/build.gradle+++ b/solr/modules/ltr/build.gradle@@ -30,6 +30,9 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })testImplementation project(':solr:test-framework')testImplementation 'org.apache.lucene:lucene-test-framework'diff --git a/solr/solrj/build.gradle b/solr/solrj/build.gradleindex 10bbc78c5c1..3d9e791ff51 100644--- a/solr/solrj/build.gradle+++ b/solr/solrj/build.gradle@@ -76,6 +76,9 @@ dependencies {testImplementation('org.mockito:mockito-core', {exclude group: "net.bytebuddy", module: "byte-buddy-agent"})+ testRuntimeOnly('org.mockito:mockito-subclass', {+ exclude group: "net.bytebuddy", module: "byte-buddy-agent"+ })testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j2-impl", {exclude group: "org.apache.logging.log4j", module: "log4j-api"})diff --git a/versions.lock b/versions.lockindex e59dbc056db..9b1f4c24a69 100644--- a/versions.lock+++ b/versions.lock@@ -405,7 +405,7 @@ io.opentracing:opentracing-mock:0.33.0 (1 constraints: 3805343b)jakarta.servlet:jakarta.servlet-api:4.0.4 (4 constraints: 586e1f6a)jakarta.websocket:jakarta.websocket-api:1.1.2 (1 constraints: 92155ab9)javax.inject:javax.inject:1 (1 constraints: 7a0df617)-net.bytebuddy:byte-buddy:1.10.20 (2 constraints: 7c10a9d0)+net.bytebuddy:byte-buddy:1.14.4 (1 constraints: 440b42de)net.minidev:accessors-smart:2.4.7 (1 constraints: 4e0a90b8)net.minidev:json-smart:2.4.7 (1 constraints: 160e936e)no.nav.security:mock-oauth2-server:0.4.3 (1 constraints: 0905fa35)@@ -435,8 +435,9 @@ org.hdrhistogram:HdrHistogram:2.1.12 (1 constraints: 520d2029)org.hsqldb:hsqldb:2.7.1 (1 constraints: 0c050b36)org.jetbrains.kotlin:kotlin-reflect:1.6.10 (2 constraints: 6224e0e2)org.latencyutils:LatencyUtils:2.0.3 (1 constraints: 210dcd1b)-org.mockito:mockito-core:3.8.0 (1 constraints: 0d051236)-org.objenesis:objenesis:3.1 (1 constraints: b00a12bd)+org.mockito:mockito-core:5.3.1 (2 constraints: d41145fd)+org.mockito:mockito-subclass:5.3.1 (1 constraints: 0b050e36)+org.objenesis:objenesis:3.3 (1 constraints: b20a14bd)org.springframework:spring-aop:5.3.27 (2 constraints: dc1e629a)org.springframework:spring-beans:5.3.27 (4 constraints: ac3ac2c8)org.springframework:spring-context:5.3.27 (2 constraints: 6d1f9ed2)diff --git a/versions.props b/versions.propsindex a376fa33610..b76d14e47ea 100644--- a/versions.props+++ b/versions.props@@ -29,7 +29,6 @@ io.prometheus:*=0.16.0io.swagger.core.v3:*=2.2.11jakarta.ws.rs:jakarta.ws.rs-api=2.1.6junit:junit=4.13.2-net.bytebuddy:byte-buddy=1.9.3net.sourceforge.argparse4j:argparse4j=0.9.0net.thisptr:jackson-jq=0.0.13no.nav.security:mock-oauth2-server=0.4.3@@ -64,7 +63,7 @@ org.hamcrest:*=2.2org.hsqldb:hsqldb=2.7.1org.immutables:value-annotations=2.9.3org.jctools:jctools-core=4.0.1-org.mockito:mockito-core=3.8.0+org.mockito:mockito*=5.3.1org.openjdk.jmh:*=1.36org.osgi:osgi.annotation=8.1.0org.quicktheories:quicktheories=0.26