Skip to content

Refactor: BinaryImporter optimization + javadoc #2525

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

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

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 24, 2025

This PR improves the BinaryImporter class by modernizing its code and enhancing maintainability:

  • Updates copyright years.
  • Replaces wildcard imports with explicit imports.
  • Adds comprehensive Javadoc comments to public methods for better documentation and usability.
  • Refactors resource management by using try-with-resources for streams to prevent resource leaks.
  • Improves logging, especially for debug statistics.
  • Changes some method visibilities and names for better encapsulation and clarity.
  • Performs minor formatting and cleanup for code consistency.

These changes make the codebase easier to understand, safer, and more maintainable, while preserving existing functionality.

@capdevon capdevon changed the title Refactor: BinaryImporter optimization + javadoc #2524 Refactor: BinaryImporter optimization + javadoc Jun 24, 2025

/**
* Creates a new {@code BinaryImporter}.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Does this Javadoc provide any non obvious information?

Copy link
Contributor Author

@capdevon capdevon Jun 27, 2025

Choose a reason for hiding this comment

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

An empty default constructor clearly just creates a new instance. However, Javadoc for every constructor is a standard and necessary practice for the Java API. It ensures generated documentation is complete and maintains consistency throughout the project's style. Even if the content seems minimal, its presence is expected.

Raising questions on these well-established conventions slows down the review without adding significant value, and it takes away valuable time that could be dedicated to more complex and relevant code issues.

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