Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 25, 2025

This PR updates the samplers module to align with all recommendations in the style guide, making minimal changes as requested.

Changes Made

Collection API improvements:

  • Changed parentLinks.size() > 0 to !parentLinks.isEmpty() in LinksBasedSampler for better readability

Static imports:

  • Added static import for java.util.Objects.hash in SamplingRule class

Class visibility:

  • Added final keyword to LinksParentAlwaysOnSamplerProvider (public classes should be final per style guide)

SPI registration:

  • Added @AutoService annotations to SPI implementations (LinksParentAlwaysOnSamplerProvider and RuleBasedRoutingSamplerComponentProvider)
  • Added AutoService dependencies to build.gradle.kts
  • Removed manual META-INF/services files (AutoService generates them automatically)
  • Added @SuppressWarnings("rawtypes") to handle AutoService warning for generic ComponentProvider

All changes maintain backward compatibility and follow the principle of minimal necessary modifications. The module builds successfully and all tests pass.

Fixes #411.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Update samplers module to follow style guide Update samplers module to follow style guide Aug 25, 2025
@Copilot Copilot AI requested a review from trask August 25, 2025 02:04
Copilot finished work on behalf of trask August 25, 2025 02:04
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.

Update samplers module to follow style guide
2 participants