HHH-9541 : NullPointerException at AbstractClassTransformerImpl#transform
This commit is contained in:
parent
1d5dcf4ad3
commit
5912f65120
|
@ -50,14 +50,16 @@ public abstract class AbstractClassTransformerImpl implements ClassTransformer {
|
|||
Class classBeingRedefined,
|
||||
ProtectionDomain protectionDomain,
|
||||
byte[] classfileBuffer) {
|
||||
// to be safe...
|
||||
className = className.replace( '/', '.' );
|
||||
if ( classFilter.shouldInstrumentClass( className ) ) {
|
||||
return doTransform( loader, className, classBeingRedefined, protectionDomain, classfileBuffer );
|
||||
}
|
||||
else {
|
||||
return classfileBuffer;
|
||||
// Java 8's resolution of lambda expressions can result in synthetic classes with no name.
|
||||
// If that is the case, skip transformation.
|
||||
if ( className != null ) {
|
||||
// to be safe...
|
||||
className = className.replace( '/', '.' );
|
||||
if ( classFilter.shouldInstrumentClass( className ) ) {
|
||||
return doTransform( loader, className, classBeingRedefined, protectionDomain, classfileBuffer );
|
||||
}
|
||||
}
|
||||
return classfileBuffer;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue