APIMBeanServer: Support both Table and Tables as metric name

Fixes #71

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
Amnon Heiman 2019-07-11 14:50:54 +03:00 committed by Benny Halevy
parent 4303f06426
commit c7bce65919

View File

@ -285,7 +285,7 @@ public class APIMBeanServer implements MBeanServer {
return server.getClassLoaderRepository();
}
static final Pattern tables = Pattern.compile("^\\*?((Index)?ColumnFamil(ies|y)|(Index)?(Tables)?)$");
static final Pattern tables = Pattern.compile("^\\*?((Index)?ColumnFamil(ies|y)|(Index)?(Table(s)?)?)$");
private boolean checkRegistrations(ObjectName name) {
if (name != null && server.isRegistered(name)) {