} else if (value2 == null) { results = -1;
  public int compare(Object _o1, Object _o2) {    try {      Object value1 = myKeyPath.getValue(_o1);      Object value2 = myKeyPath.getValue(_o2);      int results;      if (value1 == null) {        if (value2 == null) {          results = 0;        }        else if (value2 instanceof Comparable) {          results = ((Comparable) value2).compareTo(value2);        }        else {          throw new IllegalArgumentException(myKeyPath + " did not return a comparable value from " + _o2);        }      }      else if (value1 instanceof Comparable) {        results = ((Comparable) value1).compareTo(value2);      }      else {        throw new IllegalArgumentException(myKeyPath + " did not return a comparable value from " + _o1);      }      return results;    }    catch (Throwable t) {      throw new RuntimeException("Failed to retrieve value of " + myKeyPath + " on " + _o1 + " or " + _o2 + ".", t);    }  }