From 2d028c39b4e3205cbb71a5837a8f40fad89ab1b7 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:25:18 +0200 Subject: [PATCH] Align with naming in ReflectionTestUtils --- .../bean/override/mockito/MockitoSpyBeanOverrideHandler.java | 2 +- .../context/bean/override/mockito/SpringMockResolver.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoSpyBeanOverrideHandler.java b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoSpyBeanOverrideHandler.java index 0ebe08283d2c..ce929171e97d 100644 --- a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoSpyBeanOverrideHandler.java +++ b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoSpyBeanOverrideHandler.java @@ -82,7 +82,7 @@ private Object createSpy(String name, Object instance) { if (StringUtils.hasLength(name)) { settings.name(name); } - if (SpringMockResolver.aopAvailable) { + if (SpringMockResolver.springAopPresent) { settings.verificationStartedListeners(verificationStartedListener); } diff --git a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/SpringMockResolver.java b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/SpringMockResolver.java index 75fef142a7c3..27550b9d7c72 100644 --- a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/SpringMockResolver.java +++ b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/SpringMockResolver.java @@ -37,13 +37,13 @@ */ public class SpringMockResolver implements MockResolver { - static final boolean aopAvailable = ClassUtils.isPresent( + static final boolean springAopPresent = ClassUtils.isPresent( "org.springframework.aop.framework.Advised", SpringMockResolver.class.getClassLoader()); @Override public Object resolve(Object instance) { - if (aopAvailable) { + if (springAopPresent) { return getUltimateTargetObject(instance); } return instance;