WillemJiang commented on a change in pull request #699: [SCB-532] Support recursive dependency URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/699#discussion_r187901718
########## File path: common/common-javassist/src/main/java/org/apache/servicecomb/common/javassist/JavassistUtils.java ########## @@ -185,10 +185,47 @@ private static void addEnumValuesMethod(CtClass ctClass, List<String> values) th } } - LOGGER.info("generate {} in classLoader {}.", config.getClassName(), classLoader); - return ctClass.toClass(classLoader, null); + LOGGER.info("create CtClass {} in classLoader {}.", config.getClassName(), classLoader); + return ctClass; + } catch (Throwable e) { + throw new IllegalStateException( + String.format("Failed to create CtClass %s in classLoader %s.", config.getClassName(), + classLoader), e); + } + } + + public static Class<?> createClass(ClassLoader classLoader, ClassConfig config) { + if (classLoader == null) { Review comment: oh, my suggestion is not print the exception here , it just write some log message for switching the classloader to thread context classloader. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services