Skip to content

Refactor Alphabetical implementation and tests#7370

Open
felseje wants to merge 2 commits intoTheAlgorithms:masterfrom
felseje:refactor/alphabetical
Open

Refactor Alphabetical implementation and tests#7370
felseje wants to merge 2 commits intoTheAlgorithms:masterfrom
felseje:refactor/alphabetical

Conversation

@felseje
Copy link
Copy Markdown

@felseje felseje commented Apr 10, 2026

This PR refactors the Alphabetical implementation to clarify its behavior and improve consistency between code and tests.

Changes include:

  • Improved implementation readability
  • Updated tests for better coverage and clarity
  • Adjusted documentation to better describe behavior (non-decreasing lexicographical order based on Unicode)

No functional change in intended behavior.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new algorithms include a corresponding test class that validates their functionality.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.51%. Comparing base (49f9e1a) to head (3e1e980).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7370      +/-   ##
============================================
- Coverage     79.51%   79.51%   -0.01%     
- Complexity     7142     7143       +1     
============================================
  Files           796      796              
  Lines         23359    23365       +6     
  Branches       4596     4596              
============================================
+ Hits          18575    18579       +4     
- Misses         4046     4047       +1     
- Partials        738      739       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@felseje felseje force-pushed the refactor/alphabetical branch 2 times, most recently from 6810050 to 09c3007 Compare April 10, 2026 16:24
@felseje felseje force-pushed the refactor/alphabetical branch from 09c3007 to 741afcb Compare April 10, 2026 16:26
@felseje
Copy link
Copy Markdown
Author

felseje commented Apr 10, 2026

Regarding the SpotBugs warning (NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION), this appears to be a false positive.
The boolean values in Arguments.of(...) are automatically boxed to Boolean due to the Object... signature required by JUnit.

Replaced boolean literals with Boolean.TRUE/FALSE in Arguments.of(...)
to avoid SpotBugs warning (NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION).

This is a false positive caused by JUnit's Object... varargs
requiring auto-boxing.
@felseje felseje force-pushed the refactor/alphabetical branch from dd977de to 3e1e980 Compare April 10, 2026 18:23
@felseje felseje marked this pull request as ready for review April 10, 2026 18:28
@felseje
Copy link
Copy Markdown
Author

felseje commented Apr 10, 2026

PR moved out of draft and all checks are now passing. Ready for review.

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.

2 participants