Fixed AnnotationParser not detecting USE_METHOD_NAME (#1677)

This commit is contained in:
replaceitem authored and GitHub committed 2023-03-15 14:46:31 +01:00
1 parent 5a4f3ab877
commit 8aae23c983
1 file changed
+1 -1
@@ -174,7 +174,7 @@ public final class AnnotationParser
private ParsedFunction(Method method, Class<?> originClass, Supplier<Object> instance) private ParsedFunction(Method method, Class<?> originClass, Supplier<Object> instance)
{ {
ScarpetFunction annotation = method.getAnnotation(ScarpetFunction.class); ScarpetFunction annotation = method.getAnnotation(ScarpetFunction.class);
this.name = annotation.functionName() == USE_METHOD_NAME ? method.getName() : annotation.functionName(); this.name = USE_METHOD_NAME.equals(annotation.functionName()) ? method.getName() : annotation.functionName();
this.isMethodVarArgs = method.isVarArgs(); this.isMethodVarArgs = method.isVarArgs();
this.methodParamCount = method.getParameterCount(); this.methodParamCount = method.getParameterCount();