Skip to content

[NET-745] Clarify UnixFTPEntryParser trimLeadingSpaces in Javadoc#405

Merged
garydgregory merged 2 commits into
apache:masterfrom
sarankumarbaskar:NET-745-clarify-trim-leading-spaces-javadoc
Jul 22, 2026
Merged

[NET-745] Clarify UnixFTPEntryParser trimLeadingSpaces in Javadoc#405
garydgregory merged 2 commits into
apache:masterfrom
sarankumarbaskar:NET-745-clarify-trim-leading-spaces-javadoc

Conversation

@sarankumarbaskar

Copy link
Copy Markdown
Contributor

UnixFTPEntryParser preserves leading spaces in filenames by default, since Unix filenames can legitimately start with spaces. However, some FTP servers (including IBM i / OS/400 returning Unix-style listings) pad the date column with extra spaces when showing a year instead of a time for older entries, causing filenames to have an unintended leading space.

This was reported on the dev mailing list and tracked as NET-745. The trimLeadingSpaces constructor option (added in 3.4) fixes it, but the class Javadoc did not mention this behavior or the workaround.

This PR adds a paragraph to the class Javadoc explaining the issue and pointing to the trimLeadingSpaces constructor.

Resolves NET-745.

Sarankumar Baskar and others added 2 commits July 22, 2026 10:18
@garydgregory
garydgregory merged commit ba6d2d6 into apache:master Jul 22, 2026
11 checks passed
garydgregory added a commit that referenced this pull request Jul 22, 2026
space when listing contains a year instead of time (IBM i example)
(#405).

Sort members.
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