From 72fb86d5a585406ae49f3adcbaf6f78ef12295ff Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Tue, 8 May 2018 14:20:23 +1000 Subject: [PATCH] NonSystemKeyspaces jmx attribute needs to return jre list, to work with command line tools like jconsole and sjk (swiss java knife) patch by Edward Ribeiro; reviewed by Chris Lohfink, Mick Semb Wever for CASSANDRA-12271 --- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/StorageService.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5979615cb4..d8d3d6f995 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.11.3 + * Don't use guava collections in the non-system keyspace jmx attributes (CASSANDRA-12271) * Allow existing nodes to use all peers in shadow round (CASSANDRA-13851) * Fix cqlsh to read connection.ssl cqlshrc option again (CASSANDRA-14299) * Downgrade log level to trace for CommitLogSegmentManager (CASSANDRA-14370) diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index f032260a7b..edd8571075 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -4774,7 +4774,8 @@ public class StorageService extends NotificationBroadcasterSupport implements IE public List getNonSystemKeyspaces() { - return Collections.unmodifiableList(Schema.instance.getNonSystemKeyspaces()); + List nonKeyspaceNamesList = new ArrayList<>(Schema.instance.getNonSystemKeyspaces()); + return Collections.unmodifiableList(nonKeyspaceNamesList); } public List getNonLocalStrategyKeyspaces()