Validates blob key. @param key Key for the blob.
(String key)
| 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. |
no test coverage detected