From 8fcd3a1f542c220ebe486aa06cdbd9b27d5b1753 Mon Sep 17 00:00:00 2001 From: Gavin Date: Wed, 17 May 2023 12:20:17 +0200 Subject: [PATCH] get rid of a stack trace because some amazing geniuses on stackoverflow who know much more than me about Hibernate are obsessing over this DEBUG-level log message --- .../bytecode/internal/bytebuddy/BytecodeProviderImpl.java | 4 ++-- .../main/java/org/hibernate/internal/CoreMessageLogger.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BytecodeProviderImpl.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BytecodeProviderImpl.java index ab49b93f11..1baea4f9fb 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BytecodeProviderImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BytecodeProviderImpl.java @@ -168,7 +168,7 @@ public class BytecodeProviderImpl implements BytecodeProvider { findAccessors( clazz, getterNames, setterNames, types, getters, setters ); } catch (InvalidPropertyAccessorException ex) { - LOG.unableToGenerateReflectionOptimizer( clazz.getName(), ex ); + LOG.unableToGenerateReflectionOptimizer( clazz.getName(), ex.getMessage() ); return null; } @@ -232,7 +232,7 @@ public class BytecodeProviderImpl implements BytecodeProvider { findAccessors( clazz, propertyAccessMap, getters, setters ); } catch (InvalidPropertyAccessorException ex) { - LOG.unableToGenerateReflectionOptimizer( clazz.getName(), ex ); + LOG.unableToGenerateReflectionOptimizer( clazz.getName(), ex.getMessage() ); return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java index e54202b8c8..9d8753404d 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java @@ -1843,9 +1843,9 @@ public interface CoreMessageLogger extends BasicLogger { void unableToDetermineCockroachDatabaseVersion(String minimumVersion); @LogMessage(level = DEBUG) - @Message(value = "Unable to create the ReflectionOptimizer for [%s]", + @Message(value = "Unable to create the ReflectionOptimizer for [%s]: %s", id = 513) - void unableToGenerateReflectionOptimizer(String className, @Cause Throwable cause); + void unableToGenerateReflectionOptimizer(String className, String cause); @LogMessage(level = WARN) @Message(value = "PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used.",