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

refactor: FindMatches to split looong method into multiple private method, use lambda, and relax suppression of checkstyle #1174

Merged

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Nov 4, 2024

FindMatches class has been introduced in 2013 and there are several place to improve coding styles.

Pull request type

  • refactoring

Which ticket is resolved?

What does this PR change?

  • Update javadoc contents
  • style: remove final from arguments
  • revert haveChanceToAdd logic to noChanceToAdd because all conditions are negated
  • Replace inline new DefaultTranslationsIterator() and new MultiTranslationsIterator() to lambda expression
  • Add NearString and FindMatches ctors with small number of arguments, with PrepareTMXEntries and NearString.Scores data classes.

Other information

@miurahr miurahr marked this pull request as ready for review November 4, 2024 23:29
@miurahr miurahr changed the title refactor: FindMatches refactor: FindMatches to split looong method into multiple private method, use lambda, and relax suppression of checkstyle Nov 11, 2024
- Make internal methods private
- Update javadoc contents
- Make tokenize*Stem methods package-private
- style: remove final from arguments
- revert haveChanceToAdd logic to noChanceToAdd because all conditions are negated

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
…inish of thread

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@miurahr miurahr force-pushed the topic/miurahr/search/refactor-find-matches-revert-condition branch from ff3040d to 3b0c5cb Compare November 12, 2024 03:27
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@omegat-org omegat-org deleted a comment from github-actions bot Nov 12, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Nov 12, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Nov 12, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Nov 12, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Nov 12, 2024

This comment was marked as resolved.

@miurahr
Copy link
Member Author

miurahr commented Nov 12, 2024

#963 is also modifying the FindMatches class. We should make it coherent.
I want to update #963 after merging here.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@miurahr miurahr merged commit 87cdfab into master Nov 12, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant