code: private static void recordVariable(final TypeVariable var, final List<TypeVariable> found) {
          // prevent cycles
          if (!found.contains(var)) {
              found.add(var);
              for (Type type : var.getBounds()) {
                  findVariables(type, found);
              }
          }
      }
docs: variables could also contain variables, e.g. <T, K extends List<T>>