Fix return type for guard methods and typemapper methods

Dieser Commit ist enthalten in:
yoyosource 2022-04-21 22:58:45 +02:00
Ursprung 40eaa180c6
Commit 598e8b4061

Datei anzeigen

@ -180,7 +180,7 @@ public abstract class AbstractSWCommand<T> {
commandSystemWarning(() -> "The method '" + method.toString() + "' is lacking the first parameter of type '" + clazz.getTypeName() + "'");
return;
}
if (returnType != null && method.getReturnType() != returnType) {
if (returnType != null && !method.getReturnType().isAssignableFrom(returnType)) {
commandSystemWarning(() -> "The method '" + method.toString() + "' is lacking the desired return type '" + returnType.getTypeName() + "'");
return;
}