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 60852f4134
commit 378dcfbe86
1 changed files with 2 additions and 4 deletions

View File

@ -103,16 +103,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 );
}
}