diff --git a/spring-test/src/main/java/org/springframework/test/context/bean/override/BeanOverrideTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/bean/override/BeanOverrideTestExecutionListener.java index 802d9cf9779c..7bfc2cdb8c14 100644 --- a/spring-test/src/main/java/org/springframework/test/context/bean/override/BeanOverrideTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/bean/override/BeanOverrideTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ public class BeanOverrideTestExecutionListener extends AbstractTestExecutionList * Returns {@code 1950}, which ensures that the {@code BeanOverrideTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener - * DirtiesContextBeforeModesTestExecutionListener} and just before the + * DirtiesContextBeforeModesTestExecutionListener} and before the * {@link DependencyInjectionTestExecutionListener}. */ @Override diff --git a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoResetTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoResetTestExecutionListener.java index a93be56a1987..b87b8f6a5b50 100644 --- a/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoResetTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoResetTestExecutionListener.java @@ -74,7 +74,9 @@ public class MockitoResetTestExecutionListener extends AbstractTestExecutionList /** - * Returns {@code Ordered.LOWEST_PRECEDENCE - 100}. + * Returns {@code Ordered.LOWEST_PRECEDENCE - 100}, which ensures that the + * {@code MockitoResetTestExecutionListener} is ordered after all standard + * {@code TestExecutionListener} implementations. */ @Override public int getOrder() { diff --git a/spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java index 1cf69c055e27..f6f3b4937541 100644 --- a/spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,9 +64,11 @@ public class ApplicationEventsTestExecutionListener extends AbstractTestExecutio * Returns {@code 1800}, which ensures that the {@code ApplicationEventsTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener - * DirtiesContextBeforeModesTestExecutionListener} and just before the + * DirtiesContextBeforeModesTestExecutionListener} and before the * {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener - * BeanOverrideTestExecutionListener}. + * BeanOverrideTestExecutionListener} and the + * {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener + * DependencyInjectionTestExecutionListener}. */ @Override public final int getOrder() { diff --git a/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java index 419298c0c140..986f97c2d413 100644 --- a/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,7 +101,9 @@ public class EventPublishingTestExecutionListener extends AbstractTestExecutionL * Returns {@code 10000}, which ensures that the {@code EventPublishingTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener - * SqlScriptsTestExecutionListener}. + * SqlScriptsTestExecutionListener} and before the + * {@link org.springframework.test.context.bean.override.mockito.MockitoResetTestExecutionListener + * MockitoResetTestExecutionListener}. */ @Override public final int getOrder() { diff --git a/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java index 313c26bfc312..b25b4ec0511b 100644 --- a/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,7 +129,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen * Returns {@code 5000}, which ensures that the {@code SqlScriptsTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener - * TransactionalTestExecutionListener} and just before the + * TransactionalTestExecutionListener} and before the * {@link org.springframework.test.context.event.EventPublishingTestExecutionListener * EventPublishingTestExecutionListener}. */ diff --git a/spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java index 3796682d63d1..fdc3402d9cb5 100644 --- a/spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,10 +107,10 @@ public MicrometerObservationRegistryTestExecutionListener() { /** - * Returns {@code 2500}, which ensures that the {@code MicrometerObservationRegistryTestExecutionListener} - * is ordered after the + * Returns {@code 2500}, which ensures that the + * {@code MicrometerObservationRegistryTestExecutionListener} is ordered after the * {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener - * DependencyInjectionTestExecutionListener} and just before the + * DependencyInjectionTestExecutionListener} and before the * {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener * DirtiesContextTestExecutionListener}. */ diff --git a/spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java index 6c803ff98772..5b4f0156d570 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,7 @@ public class CommonCachesTestExecutionListener extends AbstractTestExecutionList /** * Returns {@code 3005}, which ensures that the {@code CommonCachesTestExecutionListener} * is ordered after the - * {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener - * DirtiesContextTestExecutionListener} and just before the + * {@link DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener} and before the * {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener * TransactionalTestExecutionListener}. */ diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java index d0df2d8d96ee..a79cd782eacc 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,12 +63,14 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut /** - * Returns {@code 2000}, which ensures that the {@code ApplicationEventsTestExecutionListener} + * Returns {@code 2000}, which ensures that the {@code DependencyInjectionTestExecutionListener} * is ordered after the - * {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener - * BeanOverrideTestExecutionListener} and just before the - * {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener - * DirtiesContextTestExecutionListener}. + * {@link DirtiesContextBeforeModesTestExecutionListener DirtiesContextBeforeModesTestExecutionListener} + * and the {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener + * BeanOverrideTestExecutionListener} and before the + * {@link org.springframework.test.context.observation.MicrometerObservationRegistryTestExecutionListener + * MicrometerObservationRegistryTestExecutionListener} and the + * {@link DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener}. */ @Override public final int getOrder() { diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java index 276c58e70f4e..78b8574bb930 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,9 @@ public class DirtiesContextBeforeModesTestExecutionListener extends AbstractDirt * Returns {@code 1500}, which ensures that the {@code DirtiesContextBeforeModesTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.web.ServletTestExecutionListener - * ServletTestExecutionListener} and just before the + * ServletTestExecutionListener} and before the + * {@link org.springframework.test.context.event.ApplicationEventsTestExecutionListener + * ApplicationEventsTestExecutionListener} and the * {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener * BeanOverrideTestExecutionListener}. */ diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java index d1f40a56ecec..8ee7df26eb34 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,10 +57,8 @@ public class DirtiesContextTestExecutionListener extends AbstractDirtiesContextT /** * Returns {@code 3000}, which ensures that the {@code DirtiesContextTestExecutionListener} * is ordered after the - * {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener - * DependencyInjectionTestExecutionListener} and just before the - * {@link org.springframework.test.context.support.CommonCachesTestExecutionListener - * CommonCachesTestExecutionListener}. + * {@link DependencyInjectionTestExecutionListener DependencyInjectionTestExecutionListener} + * and before the {@link CommonCachesTestExecutionListener CommonCachesTestExecutionListener}. */ @Override public final int getOrder() { diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java index b37f5cc90558..e4a060dad21b 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -180,7 +180,7 @@ private TransactionAttribute findTransactionAttributeInEnclosingClassHierarchy(C * Returns {@code 4000}, which ensures that the {@code TransactionalTestExecutionListener} * is ordered after the * {@link org.springframework.test.context.support.CommonCachesTestExecutionListener - * CommonCachesTestExecutionListener} and just before the + * CommonCachesTestExecutionListener} and before the * {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener * SqlScriptsTestExecutionListener}. */ diff --git a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java index 650ce10dda14..edb84c7567e2 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.