remove methods

This commit is contained in:
Looly
2022-05-01 23:30:26 +08:00
parent 6c8fb79b38
commit 50e6afc59a
13 changed files with 18 additions and 185 deletions

View File

@@ -1,8 +1,7 @@
package cn.hutool.cron.task;
import cn.hutool.core.exceptions.UtilException;
import cn.hutool.core.classloader.ClassLoaderUtil;
import cn.hutool.core.reflect.ClassUtil;
import cn.hutool.core.exceptions.UtilException;
import cn.hutool.core.reflect.ReflectUtil;
import cn.hutool.core.text.StrUtil;
import cn.hutool.cron.CronException;
@@ -51,7 +50,7 @@ public class InvokeTask implements Task{
if(StrUtil.isBlank(methodName)) {
throw new IllegalArgumentException("Method name is blank !");
}
this.method = ClassUtil.getPublicMethod(clazz, methodName);
this.method = ReflectUtil.getPublicMethod(clazz, methodName);
if(null == this.method) {
throw new IllegalArgumentException("No method with name of [" + methodName + "] !");
}