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: simplify IParseCallback#addEntry #1117

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Aug 24, 2024

Use default for old addEntry method signature to reduce code duplications.

Pull request type

  • Other (describe below)
    refactor

What does this PR change?

  • Update IParseCallback#addEntry to be default
  • Remove overrides of it
  • Update ILIASFilter and MagentoFilter to use new one

Other information

Use default for old addEntry method signature to reduce code duplications.

- Update IParseCallback#addEntry to be default
- Remove overrides of it
- Update ILIASFilter and MagentoFilter to use new one

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr miurahr changed the title feat: simplify IParseCallback#addEntry refactor: simplify IParseCallback#addEntry Aug 24, 2024

This comment was marked as resolved.

- Update lines for ParseEntry and ExternalTMFactory

Signed-off-by: Hiroshi Miura <[email protected]>
@@ -55,24 +55,46 @@ public interface IParseCallback {
* @param filter
* filter which produces entry
* @param protectedParts
* (since 3.0.6) protected parts
* protected parts
*/
void addEntryWithProperties(String id, String source, String translation, boolean isFuzzy, String[] props,
Copy link
Member Author

@miurahr miurahr Aug 31, 2024

Choose a reason for hiding this comment

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

A method addEntryWithProperties has 8 parameters, that breaks a checkstyle rule. Exceeding a number of argument is a signature of design error.

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