Skip to content

Failing test for IO-890#844

Open
sparkhi wants to merge 3 commits intoapache:masterfrom
sparkhi:master
Open

Failing test for IO-890#844
sparkhi wants to merge 3 commits intoapache:masterfrom
sparkhi:master

Conversation

@sparkhi
Copy link
Copy Markdown

@sparkhi sparkhi commented Apr 14, 2026

This PR shows the failing test only.
The test uses java.io.File to get the filename, same can be used in the implementation, however it interferes with other expectations of getName and getBaseName hence I've not proposed implementation changes.

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. Which AI tool was used to create this pull request, and to what extent did it contribute?
  • 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
Copy Markdown
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.

@sparkhi
Please fix:

[INFO] --- checkstyle:3.6.0:check (default-cli) @ commons-io ---
[INFO] There are 4 errors reported by Checkstyle 13.4.0 with D:\a\commons-io\commons-io/src/conf/checkstyle.xml ruleset.
Error:  src\test\java\org\apache\commons\io\FilenameUtilsTest.java:[1211] (regexp) Regexp: Line matches the illegal pattern 'Trailing whitespace'.
Error:  src\test\java\org\apache\commons\io\FilenameUtilsTest.java:[1215,18] (coding) FinalLocalVariable: Variable 'testFileWithBackSlash' should be declared final.
Error:  src\test\java\org\apache\commons\io\FilenameUtilsTest.java:[1216,20] (coding) FinalLocalVariable: Variable 'actualFileName' should be declared final.
Error:  src\test\java\org\apache\commons\io\FilenameUtilsTest.java:[1217,20] (coding) FinalLocalVariable: Variable 'expectedFileName' should be declared final.

@sparkhi sparkhi requested a review from garydgregory April 14, 2026 16:06
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