Skip to content

Commit 38889b8

Browse files
committed
Squash SpotBugs warnings
By making CLI properties/arguments volatile.
1 parent f4f6286 commit 38889b8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main/java/com/rabbitmq/stream/perf/StreamPerfTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void setDeleteStreams(String input) throws Exception {
177177
this.deleteStreams = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
178178
}
179179

180-
boolean deleteStreams;
180+
volatile boolean deleteStreams;
181181

182182
@CommandLine.Option(
183183
names = {"--offset", "-o"},
@@ -279,7 +279,7 @@ void setVersion(String input) throws Exception {
279279
this.version = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
280280
}
281281

282-
boolean version;
282+
volatile boolean version;
283283

284284
@CommandLine.Option(
285285
names = {"--summary-file", "-sf"},
@@ -291,7 +291,7 @@ void setSummaryFile(String input) throws Exception {
291291
this.summaryFile = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
292292
}
293293

294-
boolean summaryFile;
294+
volatile boolean summaryFile;
295295

296296
@CommandLine.Option(
297297
names = {"--producers-by-connection", "-pbc"},
@@ -335,7 +335,7 @@ void setLoadBalancer(String input) throws Exception {
335335
this.loadBalancer = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
336336
}
337337

338-
boolean loadBalancer;
338+
volatile boolean loadBalancer;
339339

340340
@CommandLine.Option(
341341
names = {"--consumer-names", "-cn"},
@@ -356,7 +356,7 @@ void setIncludeByteRates(String input) throws Exception {
356356
this.includeByteRates = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
357357
}
358358

359-
boolean includeByteRates;
359+
volatile boolean includeByteRates;
360360

361361
@CommandLine.Option(
362362
names = {"--memory-report", "-mr"},
@@ -368,7 +368,7 @@ void setMemoryReport(String input) throws Exception {
368368
this.memoryReport = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
369369
}
370370

371-
boolean memoryReport;
371+
volatile boolean memoryReport;
372372

373373
@CommandLine.Option(
374374
names = {"--server-name-indication", "-sni"},
@@ -393,7 +393,7 @@ void setEnvironmentVariables(String input) throws Exception {
393393
this.environmentVariables = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
394394
}
395395

396-
boolean environmentVariables;
396+
volatile boolean environmentVariables;
397397

398398
@CommandLine.Option(
399399
names = {"--rpc-timeout", "-rt"},
@@ -412,7 +412,7 @@ void setConfirmLatency(String input) throws Exception {
412412
this.confirmLatency = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
413413
}
414414

415-
boolean confirmLatency;
415+
volatile boolean confirmLatency;
416416

417417
@CommandLine.Option(
418418
names = {"--super-streams", "-sst"},
@@ -424,7 +424,7 @@ void setSuperStreams(String input) throws Exception {
424424
this.superStreams = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
425425
}
426426

427-
boolean superStreams;
427+
volatile boolean superStreams;
428428

429429
@CommandLine.Option(
430430
names = {"--super-stream-partitions", "-ssp"},
@@ -474,7 +474,7 @@ void setMetricsCommandLineArguments(String input) throws Exception {
474474
this.metricsCommandLineArguments = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
475475
}
476476

477-
boolean metricsCommandLineArguments;
477+
volatile boolean metricsCommandLineArguments;
478478

479479
@CommandLine.Option(
480480
names = {"--requested-max-frame-size", "-rmfs"},
@@ -493,7 +493,7 @@ void setNativeEpoll(String input) throws Exception {
493493
this.nativeEpoll = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
494494
}
495495

496-
boolean nativeEpoll;
496+
volatile boolean nativeEpoll;
497497

498498
@ArgGroup(exclusive = false, multiplicity = "0..1")
499499
InstanceSyncOptions instanceSyncOptions;
@@ -527,7 +527,7 @@ void setForceReplicaForConsumers(String input) throws Exception {
527527
this.forceReplicaForConsumers = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
528528
}
529529

530-
boolean forceReplicaForConsumers;
530+
volatile boolean forceReplicaForConsumers;
531531

532532
@CommandLine.Option(
533533
names = {"--no-dev-mode", "-ndm"},
@@ -539,7 +539,7 @@ void setNoDevMode(String input) throws Exception {
539539
this.noDevMode = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
540540
}
541541

542-
boolean noDevMode;
542+
volatile boolean noDevMode;
543543

544544
@CommandLine.Option(
545545
names = {"--dynamic-batch-size", "-dbs"},
@@ -563,7 +563,7 @@ void setIncludeByteSizeMetric(String input) throws Exception {
563563
this.includeBatchSizeMetric = Converters.BOOLEAN_TYPE_CONVERTER.convert(input);
564564
}
565565

566-
boolean includeBatchSizeMetric;
566+
volatile boolean includeBatchSizeMetric;
567567

568568
static class InstanceSyncOptions {
569569

0 commit comments

Comments
 (0)