Skip to content

Conversation

@Lastoneee
Copy link
Contributor

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best-practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

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

Hello @Lastoneee

This is over the top IMO for a utility class whose coverage is already at 99% in git master (make sure you're on the latest from git master):

image

If you want to get this class to 100%, please focus on the sanitize method.

To see the code coverage report, run:

mvn clean verify site -Ddoclint=none
open target/site/index.html

If you really want to include some of these other tests in this PR:

  • Merge code that excersie the same method into one test method
  • Inline verbose code like
 final byte[] buffer = { 0, 0, 0 };
 final int size = 3;
 assertTrue(ArchiveUtils.isArrayZero(buffer, size));

to:

 assertTrue(ArchiveUtils.isArrayZero(new byte[] { 0, 0, 0 }, 3));

Ty

@garydgregory
Copy link
Member

@Lastoneee

ping?

@Lastoneee
Copy link
Contributor Author

Hi Gary
Thank you for your suggestion; I will try to make some adjustments based on it.
Ty

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