MCPcopy Create free account
hub / github.com/apache/storm / isValidKey

Method isValidKey

storm-client/src/jvm/org/apache/storm/utils/Utils.java:1816–1823  ·  view source on GitHub ↗

Validates blob key. @param key Key for the blob.

(String key)

Source from the content-addressed store, hash-verified

1814 * @param key Key for the blob.
1815 */
1816 public static boolean isValidKey(String key) {
1817 if (StringUtils.isEmpty(key) || "..".equals(key) || ".".equals(key) || !BLOB_KEY_PATTERN.matcher(key).matches()) {
1818 LOG.error("'{}' does not appear to be valid. It must match {}. And it can't be \".\", \"..\", null or empty string.", key,
1819 BLOB_KEY_PATTERN);
1820 return false;
1821 }
1822 return true;
1823 }
1824
1825 /**
1826 * Validates topology name.

Callers 1

validateKeyMethod · 0.95

Calls 3

isEmptyMethod · 0.45
equalsMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected