code: protected String getCommonSuperClassBase(final String type1, final String type2) {
          Class<?> c, d;
          try {
              c = classForName(type1.replace('/', '.'));
              d = classForName(type2.replace('/', '.'));
          } catch (Exception e) {
              throw new RuntimeException(e.toString());
          }
          if (c.isAssignableFrom(d)) {
              return type1;
          }
          if (d.isAssignableFrom(c)) {
              return type2;
          }
          if (c.isInterface() || d.isInterface()) {
              return "java/lang/Object";
          } else {
              do {
                  c = c.getSuperclass();
              } while (!c.isAssignableFrom(d));
              return c.getName().replace('.', '/');
          }
      }
docs: rbygrave: extract to control error logging.