StorageService: scrub: fix scrubMode is empty condition

`!=` compares references not values.

Use !"".equals(scrubMode) instead, as it also covers
the null scrubMode case.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>

Closes #179
This commit is contained in:
Benny Halevy 2021-11-01 13:45:08 +02:00 committed by Avi Kivity
parent 5c383b641b
commit 48d37f3402

View File

@ -1812,7 +1812,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
throws IOException, ExecutionException, InterruptedException { throws IOException, ExecutionException, InterruptedException {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>(); MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
APIClient.set_bool_query_param(queryParams, "disable_snapshot", disableSnapshot); APIClient.set_bool_query_param(queryParams, "disable_snapshot", disableSnapshot);
if (scrubMode != "") { if (!"".equals(scrubMode)) {
APIClient.set_query_param(queryParams, "scrub_mode", scrubMode); APIClient.set_query_param(queryParams, "scrub_mode", scrubMode);
} }
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies)); APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));