-
Notifications
You must be signed in to change notification settings - Fork 823
Closed
Labels
Description
demo:
@RestSchema(schemaId="demo")
class Service
{
public static class Model
{
}
@RequestMapping(path = "/get", method = RequestMethod.GET)
public Model foo()
{
return null;
}
}
it will take error at
org.apache.servicecomb.common.javassist.CtType.(CtType.java:55)
public CtType(JavaType javaType) {
if (CtTypeJavaType.class.isInstance(javaType)) {
CtType ctType = ((CtTypeJavaType) javaType).getType();
init(ctType.ctClass, ctType.hasGenericTypes, ctType.genericSignature);
return;
}
ClassLoader classLoader = javaType.getRawClass().getClassLoader();
try {
ClassPool classPool = JavassistUtils.getOrCreateClassPool(classLoader);
**init(classPool.get(javaType.getRawClass().getCanonicalName()), javaType.hasGenericTypes(),
javaType.getGenericSignature()**
);
} catch (NotFoundException e) {
throw new IllegalStateException(
String.format("Failed to get CtClass for %s in classloader %s.",
javaType.getRawClass().getName(),
classLoader),
e);
}
}
javaType.getRawClass().getCanonicalName() is "com.zhaoyanblog.Service.Model"
the classPool.get will throw javassist.NotFoundException
the right name is "com.zhaoyanblog.Service$Model"
Reactions are currently unavailable