Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow subclasses to provide a TransactionSequence #89

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

kevinherron
Copy link
Contributor

@kevinherron kevinherron commented Nov 15, 2024

Refactor to use subclassing instead of a constructor parameter for customizing the TransactionSequence.

@kevinherron kevinherron requested a review from Copilot November 15, 2024 23:02

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

modbus/src/main/java/com/digitalpetri/modbus/client/ModbusTcpClient.java:110

  • The use of updateAndGet on transactionSequence may introduce a race condition if multiple threads access it simultaneously. Ensure that TransactionSequence is thread-safe.
TransactionSequence sequence = transactionSequence.updateAndGet(
@kevinherron kevinherron merged commit 339785a into master Nov 15, 2024
1 check passed
@kevinherron kevinherron deleted the sequence-refactor branch December 24, 2024 22:32
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