operator/src/main/java/oracle/kubernetes/operator/helpers/CrdHelper.java
private boolean isLaterOrEqual(ResourceVersion base, ResourceVersion version) {
      if (!version.getVersion().equals(base.getVersion())) {
        return version.getVersion().compareTo(base.getVersion()) >= 0;
      }

      if (version.getPrerelease() == null) {
        if (base.getPrerelease() != null) {
          return true;
        }
      } else if (!version.getPrerelease().equals(base.getPrerelease())) {
        if (base.getPrerelease() == null) {
          return false;
        }
        return "alpha".equals(base.getPrerelease());
      }

      if (version.getPrereleaseVersion() == null) {
        return base.getPrereleaseVersion() == null;
      } else if (base.getPrereleaseVersion() == null) {
        return true;
      }
      return version.getPrereleaseVersion() >= base.getPrereleaseVersion();
    }
// true, if version is later than base
true, if version is later than base
true if version is later than base
private boolean isLaterOrEqual(ResourceVersion base, ResourceVersion version) {
      if (!version.getVersion().equals(base.getVersion())) {
        return version.getVersion().compareTo(base.getVersion()) >= 0;
      }
      if (version.getPrerelease() == null) {
        if (base.getPrerelease() != null) {
          return true;
        }
      } else if (!version.getPrerelease().equals(base.getPrerelease())) {
        if (base.getPrerelease() == null) {
          return false;
        }
        return "alpha".equals(base.getPrerelease());
      }
      if (version.getPrereleaseVersion() == null) {
        return base.getPrereleaseVersion() == null;
      } else if (base.getPrereleaseVersion() == null) {
        return true;
      }
      return version.getPrereleaseVersion() >= base.getPrereleaseVersion();
    }
private boolean isLaterOrEqual ( ResourceVersion base , ResourceVersion version ) { if ( ! version . getVersion ( ) . equals ( base . getVersion ( ) ) ) { return version . getVersion ( ) . compareTo ( base . getVersion ( ) ) >= 0 ; } if ( version . getPrerelease ( ) == null ) { if ( base . getPrerelease ( ) != null ) { return true ; } } else if ( ! version . getPrerelease ( ) . equals ( base . getPrerelease ( ) ) ) { if ( base . getPrerelease ( ) == null ) { return false ; } return "alpha" . equals ( base . getPrerelease ( ) ) ; } if ( version . getPrereleaseVersion ( ) == null ) { return base . getPrereleaseVersion ( ) == null ; } else if ( base . getPrereleaseVersion ( ) == null ) { return true ; } return version . getPrereleaseVersion ( ) >= base . getPrereleaseVersion ( ) ; }
true, if version is later than base
true if version is later than base