Skip to content

Commit 8d72ce2

Browse files
committed
Better choice for package names to be allowed by ByteBuddy's CoreTypePool
1 parent 87ba94d commit 8d72ce2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/bytebuddy/CoreTypePool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class CoreTypePool extends TypePool.AbstractBase implements TypePool {
3535
* or "java."
3636
*/
3737
public CoreTypePool() {
38-
//By default optimise for jakarta annotations, and java util collections
39-
this("jakarta.", "java.", "org.hibernate.annotations.");
38+
//By default optimise for jakarta annotations, java util collections, and Hibernate marker interfaces
39+
this("jakarta.", "java.", "org.hibernate.annotations.", "org.hibernate.bytecode.enhance.spi.", "org.hibernate.engine.spi.");
4040
}
4141

4242
/**

hibernate-core/src/main/java/org/hibernate/jpa/internal/enhance/EnhancingClassTransformerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class EnhancingClassTransformerImpl implements ClassTransformer {
3232
private volatile WeakReference<Entry> entryReference;
3333

3434
//This list is matching the constants used by CoreTypePool's default constructor
35-
private static final String[] NO_TRANSFORM_PREFIXES = { "jakarta/", "java/", "org/hibernate/annotations/" };
35+
private static final String[] NO_TRANSFORM_PREFIXES = { "jakarta/", "java/", "org/hibernate/annotations/", "org/hibernate/bytecode/enhance/spi/", "org/hibernate/engine/spi/" };
3636

3737
public EnhancingClassTransformerImpl(EnhancementContext enhancementContext) {
3838
Objects.requireNonNull( enhancementContext );

0 commit comments

Comments
 (0)