Skip to content

Commit

Permalink
node_probe: toppartitions: Fix wrong class in getMethod
Browse files Browse the repository at this point in the history
We check for the existence of the new toppartitions JMX API
using Class.getMethod, but use wrong class for List<String>
in parameter list. This change fixes that.
  • Loading branch information
Piotr Wojtczak authored and avikivity committed Jun 6, 2021
1 parent 6a6f42e commit 1a00241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java/org/apache/cassandra/tools/NodeProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public Map<Sampler, CompositeData> getToppartitions(List<String> keyspaceFilters
try
{
Class[] cArg = new Class[6];
cArg[0] = cArg[1] = cArg[2] = (Class<List<String>>) Collections.<String>emptyList().getClass();
cArg[0] = cArg[1] = cArg[2] = List.class;
cArg[3] = cArg[4] = cArg[5] = int.class;

// make sure that JMX has the newer API, throws NoSuchMethodException if not
Expand Down

0 comments on commit 1a00241

Please sign in to comment.