public class JMXUtils extends Object
| Constructor and Description |
|---|
JMXUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
quoteJMXIfNecessary(String value)
Returns the given string quoted with
ObjectName.quote(String) if it contains illegal
characters; otherwise, returns the original string. |
@NonNull public static String quoteJMXIfNecessary(@NonNull String value)
ObjectName.quote(String) if it contains illegal
characters; otherwise, returns the original string.
The Object
Name Syntax does not define which characters are legal or not in a property value;
therefore this method adopts a conservative approach and quotes all values that do not match
the regex [a-zA-Z0-9_]+.
value - The value to quote if necessary.Copyright © 2017–2021 DataStax. All rights reserved.