@Test public void testCheckVersion210() { assertFalse(Version.check("2.1.0", HBCK2.MINIMUM_HBCK2_VERSION)); }
static boolean check(final String version, String ... thresholdVersions) { if (thresholdVersions == null) { return true; } boolean supported = false; String [] versionComponents = getVersionComponents(version); boolean excessiveMajor = false; boolean excessiveMinor = false; for (String thresholdVersion: thresholdVersions) { String[] thresholdVersionComponents = getVersionComponents(thresholdVersion); int serverMajor = Integer.parseInt(versionComponents[MAJOR]); int thresholdMajor = Integer.parseInt(thresholdVersionComponents[MAJOR]); if (serverMajor > thresholdMajor) { excessiveMajor = true; continue; } excessiveMajor = false; if (serverMajor < thresholdMajor) { continue; } int serverMinor = Integer.parseInt(versionComponents[MINOR]); int thresholdMinor = Integer.parseInt(thresholdVersionComponents[MINOR]); if (serverMinor > thresholdMinor) { excessiveMinor = true; continue; } excessiveMinor = false; if (serverMinor < thresholdMinor) { continue; } if (Integer.parseInt(versionComponents[PATCH]) >= Integer.parseInt(thresholdVersionComponents[PATCH])) { supported = true; } break; } return supported || excessiveMajor || excessiveMinor; }
Version { static boolean check(final String version, String ... thresholdVersions) { if (thresholdVersions == null) { return true; } boolean supported = false; String [] versionComponents = getVersionComponents(version); boolean excessiveMajor = false; boolean excessiveMinor = false; for (String thresholdVersion: thresholdVersions) { String[] thresholdVersionComponents = getVersionComponents(thresholdVersion); int serverMajor = Integer.parseInt(versionComponents[MAJOR]); int thresholdMajor = Integer.parseInt(thresholdVersionComponents[MAJOR]); if (serverMajor > thresholdMajor) { excessiveMajor = true; continue; } excessiveMajor = false; if (serverMajor < thresholdMajor) { continue; } int serverMinor = Integer.parseInt(versionComponents[MINOR]); int thresholdMinor = Integer.parseInt(thresholdVersionComponents[MINOR]); if (serverMinor > thresholdMinor) { excessiveMinor = true; continue; } excessiveMinor = false; if (serverMinor < thresholdMinor) { continue; } if (Integer.parseInt(versionComponents[PATCH]) >= Integer.parseInt(thresholdVersionComponents[PATCH])) { supported = true; } break; } return supported || excessiveMajor || excessiveMinor; } }
Version { static boolean check(final String version, String ... thresholdVersions) { if (thresholdVersions == null) { return true; } boolean supported = false; String [] versionComponents = getVersionComponents(version); boolean excessiveMajor = false; boolean excessiveMinor = false; for (String thresholdVersion: thresholdVersions) { String[] thresholdVersionComponents = getVersionComponents(thresholdVersion); int serverMajor = Integer.parseInt(versionComponents[MAJOR]); int thresholdMajor = Integer.parseInt(thresholdVersionComponents[MAJOR]); if (serverMajor > thresholdMajor) { excessiveMajor = true; continue; } excessiveMajor = false; if (serverMajor < thresholdMajor) { continue; } int serverMinor = Integer.parseInt(versionComponents[MINOR]); int thresholdMinor = Integer.parseInt(thresholdVersionComponents[MINOR]); if (serverMinor > thresholdMinor) { excessiveMinor = true; continue; } excessiveMinor = false; if (serverMinor < thresholdMinor) { continue; } if (Integer.parseInt(versionComponents[PATCH]) >= Integer.parseInt(thresholdVersionComponents[PATCH])) { supported = true; } break; } return supported || excessiveMajor || excessiveMinor; } private  Version(); }
Version { static boolean check(final String version, String ... thresholdVersions) { if (thresholdVersions == null) { return true; } boolean supported = false; String [] versionComponents = getVersionComponents(version); boolean excessiveMajor = false; boolean excessiveMinor = false; for (String thresholdVersion: thresholdVersions) { String[] thresholdVersionComponents = getVersionComponents(thresholdVersion); int serverMajor = Integer.parseInt(versionComponents[MAJOR]); int thresholdMajor = Integer.parseInt(thresholdVersionComponents[MAJOR]); if (serverMajor > thresholdMajor) { excessiveMajor = true; continue; } excessiveMajor = false; if (serverMajor < thresholdMajor) { continue; } int serverMinor = Integer.parseInt(versionComponents[MINOR]); int thresholdMinor = Integer.parseInt(thresholdVersionComponents[MINOR]); if (serverMinor > thresholdMinor) { excessiveMinor = true; continue; } excessiveMinor = false; if (serverMinor < thresholdMinor) { continue; } if (Integer.parseInt(versionComponents[PATCH]) >= Integer.parseInt(thresholdVersionComponents[PATCH])) { supported = true; } break; } return supported || excessiveMajor || excessiveMinor; } private  Version();  }
Version { static boolean check(final String version, String ... thresholdVersions) { if (thresholdVersions == null) { return true; } boolean supported = false; String [] versionComponents = getVersionComponents(version); boolean excessiveMajor = false; boolean excessiveMinor = false; for (String thresholdVersion: thresholdVersions) { String[] thresholdVersionComponents = getVersionComponents(thresholdVersion); int serverMajor = Integer.parseInt(versionComponents[MAJOR]); int thresholdMajor = Integer.parseInt(thresholdVersionComponents[MAJOR]); if (serverMajor > thresholdMajor) { excessiveMajor = true; continue; } excessiveMajor = false; if (serverMajor < thresholdMajor) { continue; } int serverMinor = Integer.parseInt(versionComponents[MINOR]); int thresholdMinor = Integer.parseInt(thresholdVersionComponents[MINOR]); if (serverMinor > thresholdMinor) { excessiveMinor = true; continue; } excessiveMinor = false; if (serverMinor < thresholdMinor) { continue; } if (Integer.parseInt(versionComponents[PATCH]) >= Integer.parseInt(thresholdVersionComponents[PATCH])) { supported = true; } break; } return supported || excessiveMajor || excessiveMinor; } private  Version();   }