Skip to content

Commit

Permalink
HSEARCH-1085 MappingModelMetadataProvider should pass the chosen Clas…
Browse files Browse the repository at this point in the history
…sLoader rather than overriding the context
  • Loading branch information
Sanne committed May 2, 2018
1 parent 0c646c9 commit 21e0372
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 71 deletions.

This file was deleted.

Expand Up @@ -310,20 +310,6 @@ private static Annotation createAnnotation(AnnotationDescriptor annotation) {
//The return type of this method could be "<T extends Annotation> T"
//but that would fail to compile on some JVMs: see HSEARCH-1106.

//This is a filthy workaround for the Annotations proxy generation,
//which is using the ContextClassLoader to define the proxy classes
//(not working fine in modular environments when Search is used by
//other services such as CapeDwarf).
//See HSEARCH-1084

//use annotation's own classloader
try {
return AnnotationFactory.create( annotation, annotation.type().getClassLoader() );
}
catch (Exception e) {
//first try, but we have another trick
}
//Use TCCL
return org.hibernate.annotations.common.annotationfactory.AnnotationFactory.create( annotation );
}

Expand Down

0 comments on commit 21e0372

Please sign in to comment.