HHH-13048 Allow for parallel processing of entity enhancements via ByteBuddy
This commit is contained in:
parent
aae9cd14a5
commit
76274bf33e
|
@ -96,7 +96,7 @@ public class EnhancerImpl implements Enhancer {
|
||||||
* @throws EnhancementException Indicates a problem performing the enhancement
|
* @throws EnhancementException Indicates a problem performing the enhancement
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public synchronized byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
|
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException {
|
||||||
//Classpool#describe does not accept '/' in the description name as it expects a class name. See HHH-12545
|
//Classpool#describe does not accept '/' in the description name as it expects a class name. See HHH-12545
|
||||||
final String safeClassName = className.replace( '/', '.' );
|
final String safeClassName = className.replace( '/', '.' );
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -18,6 +18,10 @@ public interface Enhancer {
|
||||||
/**
|
/**
|
||||||
* Performs the enhancement.
|
* Performs the enhancement.
|
||||||
*
|
*
|
||||||
|
* It is possible to invoke this method concurrently, but when doing so make sure
|
||||||
|
* no two enhancement tasks are invoked on the same class in parallel: the
|
||||||
|
* Enhancer implementations are not required to guard against this.
|
||||||
|
*
|
||||||
* @param className The name of the class whose bytecode is being enhanced.
|
* @param className The name of the class whose bytecode is being enhanced.
|
||||||
* @param originalBytes The class's original (pre-enhancement) byte code
|
* @param originalBytes The class's original (pre-enhancement) byte code
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue