File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
typescript-generator-core/src/main/java/cz/habarta/typescript/generator Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 1313public class JaxrsApplicationScanner {
1414
1515 public static List <SourceType <Type >> scanJaxrsApplication (Class <?> jaxrsApplicationClass , Predicate <String > isClassNameExcluded ) {
16+ final ClassLoader originalContextClassLoader = Thread .currentThread ().getContextClassLoader ();
1617 try {
18+ Thread .currentThread ().setContextClassLoader (jaxrsApplicationClass .getClassLoader ());
1719 System .out .println ("Scanning JAX-RS application: " + jaxrsApplicationClass .getName ());
1820 final Constructor <?> constructor = jaxrsApplicationClass .getDeclaredConstructor ();
1921 constructor .setAccessible (true );
@@ -27,6 +29,8 @@ public static List<SourceType<Type>> scanJaxrsApplication(Class<?> jaxrsApplicat
2729 return new JaxrsApplicationScanner ().scanJaxrsApplication (jaxrsApplicationClass , resourceClasses , isClassNameExcluded );
2830 } catch (ReflectiveOperationException e ) {
2931 throw reportError (e );
32+ } finally {
33+ Thread .currentThread ().setContextClassLoader (originalContextClassLoader );
3034 }
3135 }
3236
You can’t perform that action at this time.
0 commit comments