HHH-12554 Make EnhancerImpl more closely match the semantics described in Enhancer javadoc

This commit is contained in:
Sanne Grinovero 2018-05-08 16:50:07 +01:00
parent 2fa5d3ccb8
commit 207a8f03af
1 changed files with 2 additions and 4 deletions

View File

@ -107,16 +107,14 @@ public class EnhancerImpl implements Enhancer {
managedCtClass
);
if ( builder == null ) {
return null;
return originalBytes;
}
else {
return builder.make().getBytes();
}
}
catch (RuntimeException e) {
e.printStackTrace();
log.unableToBuildEnhancementMetamodel( safeClassName );
return null;
throw new EnhancementException( "Failed to enhance class " + className, e );
}
}