Skip to content

Refactor reuse random instance and duplicate literal 7times#17298

Open
anukalp2804 wants to merge 1 commit intoapache:masterfrom
anukalp2804:refactor-reuse-random-instance-duplicate-literal-7times
Open

Refactor reuse random instance and duplicate literal 7times#17298
anukalp2804 wants to merge 1 commit intoapache:masterfrom
anukalp2804:refactor-reuse-random-instance-duplicate-literal-7times

Conversation

@anukalp2804
Copy link
Contributor

Description

This PR fixes duplicate literals 7 times and also solve the Save and re-use this "Random" reported by the sonarcloud analysis tool.These changes ensure the code follows the project's formatting guidelines.

Changes:

  • replace the duplicate literals with constant
  • creates a single reusable Random instance as a class-level constant.

Files modified:

  • example/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTClient.java.

This change addresses a Sonar-reported duplicate literals for the show tables:

This PR has:

  • been self-reviewed.
  • been built locally with mvn spotless:apply.
  • been built locally with mvn clean package -DskipTests.
  • been built locally with mvn -pl iotdb-core -am test -DskipTests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant