mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-10078 - Enforce sychronization of non thread-safe method Enhancer.enhance()
(cherry picked from commit 03801b62ec2aa7cc9707e1014da0967101ef85ea)
This commit is contained in:
parent
e3c6c02178
commit
60c4c9846a
@ -81,7 +81,7 @@ public Enhancer(EnhancementContext enhancementContext) {
|
||||
*
|
||||
* @throws EnhancementException Indicates a problem performing the enhancement
|
||||
*/
|
||||
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
|
||||
public synchronized byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
|
||||
try {
|
||||
final CtClass managedCtClass = classPool.makeClassIfNew( new ByteArrayInputStream( originalBytes ) );
|
||||
enhance( managedCtClass );
|
||||
|
Loading…
x
Reference in New Issue
Block a user