Permalink
Browse files

DUBBO-635 JValidator在类名生成的类名有$,有frozen class异常

  • Loading branch information...
1 parent 841f6c2 commit e4dea029546efe9e7a6184ad528560e62303ce02 @oldratlee oldratlee committed with oldratlee Mar 5, 2013
@@ -89,7 +89,7 @@ public JValidator(URL url) {
}
public void validate(String methodName, Class<?>[] parameterTypes, Object[] arguments) throws Exception {
- String methodClassName = clazz.getName() + "$" + toUpperMethoName(methodName);
+ String methodClassName = clazz.getName() + "_" + toUpperMethoName(methodName);
Class<?> methodClass = null;
try {
methodClass = Class.forName(methodClassName, false, Thread.currentThread().getContextClassLoader());
@@ -157,7 +157,7 @@ private static Object getMethodParameterBean(Class<?> clazz, Method method, Obje
try {
String upperName = toUpperMethoName(method.getName());
String parameterSimpleName = upperName + "Parameter";
- String parameterClassName = clazz.getName() + "$" + parameterSimpleName;
+ String parameterClassName = clazz.getName() + "_" + parameterSimpleName;
Class<?> parameterClass;
try {
parameterClass = (Class<?>) Class.forName(parameterClassName, true, clazz.getClassLoader());

1 comment on commit e4dea02

@lysongfei

$ -> _后,@interface生成的内部类无法加载、导致Bean validator无法正常校验

Please sign in to comment.