String (Version lowerBoundVersion) { String lowerBoundString = lowerBoundVersion.toString(); String candidate = lowerBoundString.split("[.\\-_]")[0]; try { Version candidateVersion = ourVersioning.parseVersion(candidate); if (lowerBoundVersion.compareTo(candidateVersion) < 0) { return lowerBoundString; } } catch (InvalidVersionSpecificationException e) { LOG.info("Failed to parse major part of lower bound of version " + lowerBoundVersion, e); } return candidate; }