From e340e45f5a689ef622eaa48ca1541d26a83a0d05 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:38:31 +0200 Subject: [PATCH] Rename aopAvailable constants in TransactionSynchronizationUtils Closes gh-33796 --- .../aot/nativex/feature/PreComputeFieldFeature.java | 6 +++--- .../reactive/TransactionSynchronizationUtils.java | 6 +++--- .../support/TransactionSynchronizationUtils.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/aot/nativex/feature/PreComputeFieldFeature.java b/spring-core/src/main/java/org/springframework/aot/nativex/feature/PreComputeFieldFeature.java index d0ca2c7146..8dc9fbc428 100644 --- a/spring-core/src/main/java/org/springframework/aot/nativex/feature/PreComputeFieldFeature.java +++ b/spring-core/src/main/java/org/springframework/aot/nativex/feature/PreComputeFieldFeature.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -23,8 +23,8 @@ import java.util.regex.Pattern; import org.graalvm.nativeimage.hosted.Feature; /** - * GraalVM {@link Feature} that substitutes boolean field values that match a certain pattern - * with values pre-computed AOT without causing class build-time initialization. + * GraalVM {@link Feature} that substitutes boolean field values that match certain patterns + * with values pre-computed ahead-of-time without causing class build-time initialization. * *

It is possible to pass

-Dspring.native.precompute.log=verbose
as a *
native-image
compiler build argument to display detailed logs diff --git a/spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java b/spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java index 192580a64c..6199000874 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java +++ b/spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionSynchronizationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -42,7 +42,7 @@ abstract class TransactionSynchronizationUtils { private static final Log logger = LogFactory.getLog(TransactionSynchronizationUtils.class); - private static final boolean aopAvailable = ClassUtils.isPresent( + private static final boolean aopPresent = ClassUtils.isPresent( "org.springframework.aop.scope.ScopedObject", TransactionSynchronizationUtils.class.getClassLoader()); @@ -58,7 +58,7 @@ abstract class TransactionSynchronizationUtils { if (resourceRef instanceof InfrastructureProxy infrastructureProxy) { resourceRef = infrastructureProxy.getWrappedObject(); } - if (aopAvailable) { + if (aopPresent) { // now unwrap scoped proxy resourceRef = ScopedProxyUnwrapper.unwrapIfNecessary(resourceRef); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java index 33854e60f0..e3effdc991 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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 abstract class TransactionSynchronizationUtils { private static final Log logger = LogFactory.getLog(TransactionSynchronizationUtils.class); - private static final boolean aopAvailable = ClassUtils.isPresent( + private static final boolean aopPresent = ClassUtils.isPresent( "org.springframework.aop.scope.ScopedObject", TransactionSynchronizationUtils.class.getClassLoader()); @@ -67,7 +67,7 @@ public abstract class TransactionSynchronizationUtils { if (resourceRef instanceof InfrastructureProxy infrastructureProxy) { resourceRef = infrastructureProxy.getWrappedObject(); } - if (aopAvailable) { + if (aopPresent) { // now unwrap scoped proxy resourceRef = ScopedProxyUnwrapper.unwrapIfNecessary(resourceRef); }