HHH-10078 - Enforce sychronization of non thread-safe method Enhancer.enhance()
This commit is contained in:
parent
4d6eca5ff8
commit
03801b62ec
|
@ -81,7 +81,7 @@ public class Enhancer {
|
||||||
*
|
*
|
||||||
* @throws EnhancementException Indicates a problem performing the enhancement
|
* @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 {
|
try {
|
||||||
final CtClass managedCtClass = classPool.makeClassIfNew( new ByteArrayInputStream( originalBytes ) );
|
final CtClass managedCtClass = classPool.makeClassIfNew( new ByteArrayInputStream( originalBytes ) );
|
||||||
enhance( managedCtClass );
|
enhance( managedCtClass );
|
||||||
|
|
Loading…
Reference in New Issue