Skip to content

Commit 9a1cccc

Browse files
committed
Suppress Sonar warning for Random usage in RealSentimentAnalysisServer
1 parent d727e99 commit 9a1cccc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

service-stub/src/main/java/com/iluwatar/servicestub/RealSentimentAnalysisServer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public RealSentimentAnalysisServer(Supplier<Integer> sentimentSupplier) {
2626
this.sentimentSupplier = sentimentSupplier;
2727
}
2828

29+
@SuppressWarnings("java:S2245") // Safe use: Randomness is for simulation/testing only
2930
public RealSentimentAnalysisServer() {
3031
this(() -> new Random().nextInt(3));
3132
}

0 commit comments

Comments
 (0)