protected static void checkReturnType(Method method, Class<?> expected) {
    if (method != null && !expected.isAssignableFrom(method.getReturnType())) {
      log.error("Method " + method.getClass().getName() + "." + method.getName()
          + "(..) should return " + expected.getName() + " but returns "
          + method.getReturnType().getName() + " instead.");
      setInvalid();
    }
  }
Verifies that the return type of a method is what it is expected to be. If it is not, then
this VFS is marked as invalid for the current environment.

@param method The method whose return type is to be checked.
@param expected A type to which the method's return type must be assignable.
@see Class#isAssignableFrom(Class)
src/main/java/org/apache/ibatis/io/JBoss6VFS.java