MCPcopy Create free account
hub / github.com/crate/crate / fromString

Method fromString

server/src/main/java/org/elasticsearch/Version.java:384–393  ·  view source on GitHub ↗

Returns the version given its string representation, current version if the argument is null or empty

(String version)

Source from the content-addressed store, hash-verified

382 * Returns the version given its string representation, current version if the argument is null or empty
383 */
384 public static Version fromString(String version) {
385 if (!Strings.hasLength(version)) {
386 return Version.CURRENT;
387 }
388 final Version cached = STRING_TO_VERSION.get(version);
389 if (cached != null) {
390 return cached;
391 }
392 return fromStringSlow(version);
393 }
394
395 private static Version fromStringSlow(String version) {
396 final boolean snapshot; // this is some BWC for 2.x and before indices

Callers 12

snapshotsFromXContentMethod · 0.95
parseSnapshotsMethod · 0.95
parseMethod · 0.45
invokeParserMethod · 0.45
testRemoveExpiredLogsMethod · 0.45
boundJobIdMethod · 0.45
parseMethod · 0.45
sanitizeValueMethod · 0.45
decodeUTF8TextMethod · 0.45

Calls 3

hasLengthMethod · 0.95
fromStringSlowMethod · 0.95
getMethod · 0.65

Tested by 3

testRemoveExpiredLogsMethod · 0.36