operator/src/main/java/oracle/kubernetes/operator/helpers/KubernetesUtils.java
public static boolean isFirstNewer(V1ObjectMeta first, V1ObjectMeta second) {
    if (second == null) {
      return true;
    }
    if (first == null) {
      return false;
    }

    DateTime time1 = first.getCreationTimestamp();
    DateTime time2 = second.getCreationTimestamp();

    if (time1.equals(time2)) {
      return getResourceVersion(first).compareTo(getResourceVersion(second)) > 0;
    } else {
      return time1.isAfter(time2);
    }
  }
/**
   * Returns true if the first metadata indicates a newer resource than does the second. 'Newer'
   * indicates that the creation time is later. If two items have the same creation time, a higher
   * resource version indicates the newer resource.
   *
   * @param first  the first item to compare
   * @param second the second item to compare
   * @return true if the first object is newer than the second object
   */
Returns true if the first metadata indicates a newer resource than does the second. 'Newer'
indicates that the creation time is later. If two items have the same creation time, a higher
resource version indicates the newer resource.

@param first  the first item to compare
@param second the second item to compare
@return true if the first object is newer than the second object
Returns true if the first metadata indicates a newer resource than does the second . ' Newer ' indicates that the creation time is later . If two items have the same creation time a higher resource version indicates the newer resource . @param first the first item to compare @param second the second item to compare @return true if the first object is newer than the second object
public static boolean isFirstNewer(V1ObjectMeta first, V1ObjectMeta second) {
    if (second == null) {
      return true;
    }
    if (first == null) {
      return false;
    }
    DateTime time1 = first.getCreationTimestamp();
    DateTime time2 = second.getCreationTimestamp();
    if (time1.equals(time2)) {
      return getResourceVersion(first).compareTo(getResourceVersion(second)) > 0;
    } else {
      return time1.isAfter(time2);
    }
  }
public static boolean isFirstNewer ( V1ObjectMeta first , V1ObjectMeta second ) { if ( second == null ) { return true ; } if ( first == null ) { return false ; } DateTime time1 = first . getCreationTimestamp ( ) ; DateTime time2 = second . getCreationTimestamp ( ) ; if ( time1 . equals ( time2 ) ) { return getResourceVersion ( first ) . compareTo ( getResourceVersion ( second ) ) > 0 ; } else { return time1 . isAfter ( time2 ) ; } }
Returns true if the first metadata indicates a newer resource than does the second.
Returns true if the first metadata indicates a newer resource than does the second .