Skip to content

Commit 60c4c98

Browse files
barreirosebersole
authored andcommitted
HHH-10078 - Enforce sychronization of non thread-safe method Enhancer.enhance()
(cherry picked from commit 03801b6)
1 parent e3c6c02 commit 60c4c98

File tree

1 file changed

+1
-1
lines changed
  • hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/Enhancer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public Enhancer(EnhancementContext enhancementContext) {
8181
*
8282
* @throws EnhancementException Indicates a problem performing the enhancement
8383
*/
84-
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
84+
public synchronized byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
8585
try {
8686
final CtClass managedCtClass = classPool.makeClassIfNew( new ByteArrayInputStream( originalBytes ) );
8787
enhance( managedCtClass );

0 commit comments

Comments
 (0)