diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java index 76f4e27e78..97f768d4c4 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java @@ -182,7 +182,7 @@ public final class ByteBuddyState { } public Unloaded make(Function> makeProxyFunction) { - return make(makeProxyFunction.apply( byteBuddy )); + return make( makeProxyFunction.apply( byteBuddy ) ); } private Unloaded make(DynamicType.Builder builder) { diff --git a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java index e4fa59a686..dc66871460 100644 --- a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java @@ -45,29 +45,25 @@ public class ByteBuddyProxyHelper implements Serializable { } @SuppressWarnings({ "unchecked", "rawtypes" }) - public Class buildProxy( - final Class persistentClass, - final Class[] interfaces) { + public Class buildProxy(final Class persistentClass, final Class[] interfaces) { Set> key = new HashSet>(); if ( interfaces.length == 1 ) { key.add( persistentClass ); } key.addAll( Arrays.>asList( interfaces ) ); - return byteBuddyState.loadProxy( persistentClass, new TypeCache.SimpleKey(key), proxyBuilder(persistentClass, interfaces) ); + return byteBuddyState.loadProxy( persistentClass, new TypeCache.SimpleKey( key ), proxyBuilder( persistentClass, interfaces ) ); } + /** + * Do not remove: used by Quarkus + */ @SuppressWarnings({ "unchecked", "rawtypes" }) - public DynamicType.Unloaded buildUnloadedProxy( - final Class persistentClass, - final Class[] interfaces) { + public DynamicType.Unloaded buildUnloadedProxy(final Class persistentClass, final Class[] interfaces) { return byteBuddyState.make( proxyBuilder( persistentClass, interfaces ) ); } - private Function> proxyBuilder( - Class persistentClass, - Class[] interfaces - ) { + private Function> proxyBuilder(Class persistentClass, Class[] interfaces) { return byteBuddy -> byteBuddy .ignore( byteBuddyState.getProxyDefinitionHelpers().getGroovyGetMetaClassFilter() ) .with( new NamingStrategy.SuffixingRandom( PROXY_NAMING_SUFFIX, new NamingStrategy.SuffixingRandom.BaseNameResolver.ForFixedValue( persistentClass.getName() ) ) )