From 9872358bed88146ae438e98d5bcd544beedc4604 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 12 Nov 2015 10:47:52 -0600 Subject: [PATCH] HHH-10281 - More formally deprecate the legacy bytecode enhancement code --- .../buildtime/internal/JavassistInstrumenter.java | 2 ++ .../org/hibernate/internal/log/DeprecationLogger.java | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/buildtime/internal/JavassistInstrumenter.java b/hibernate-core/src/main/java/org/hibernate/bytecode/buildtime/internal/JavassistInstrumenter.java index d8d6367162..72573c358d 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/buildtime/internal/JavassistInstrumenter.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/buildtime/internal/JavassistInstrumenter.java @@ -20,6 +20,7 @@ import org.hibernate.bytecode.buildtime.spi.Logger; import org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl; import org.hibernate.bytecode.internal.javassist.FieldHandled; import org.hibernate.bytecode.spi.ClassTransformer; +import org.hibernate.internal.log.DeprecationLogger; /** * Strategy for performing build-time instrumentation of persistent classes in order to enable @@ -42,6 +43,7 @@ public class JavassistInstrumenter extends AbstractInstrumenter { */ public JavassistInstrumenter(Logger logger, Options options) { super( logger, options ); + DeprecationLogger.DEPRECATION_LOGGER.logDeprecatedBytecodeEnhancement(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/internal/log/DeprecationLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/log/DeprecationLogger.java index 15c9ec543c..196bd256fa 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/log/DeprecationLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/log/DeprecationLogger.java @@ -200,4 +200,13 @@ public interface DeprecationLogger extends BasicLogger { value = "Found use of deprecated transaction factory setting [%s]; use the new TransactionCoordinatorBuilder settings [%s] instead" ) void logDeprecatedTransactionFactorySetting(String legacySettingName, String updatedSettingName); + + @LogMessage(level = WARN) + @Message( + id = 90000019, + value = "You are using the deprecated legacy bytecode enhancement feature which has been superseded by a vastly improved bytecode enhancer." + ) + void logDeprecatedBytecodeEnhancement(); + + }