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

Change class org.apache.commons.net.ftp.parser.MVSFTPEntryParser to support more datasets #182

Merged
merged 7 commits into from
Sep 13, 2023
Merged

Change class org.apache.commons.net.ftp.parser.MVSFTPEntryParser to support more datasets #182

merged 7 commits into from
Sep 13, 2023

Conversation

haegar9766
Copy link
Contributor

Current MVSFTPEntryParser code doesn't support all possible datasets because some RECFM options (e.g. "FBA") are not listet in "static final String FILE_LIST_REGEX" (see also Jira-Ticket NET-725). This PR should fix this problem.

  • RECFM (record format) of an MVS dataset is not a relevant information about a dataset. Therefore it should be ignored in definition of "static final String FILE_LIST_REGEX".
  • Method "parseFileList(final String entry)" should also migrated and archived datasets.

RECFM (record format) of an MVS dataset is not a relevant information about a dataset. Therefore it should be ignored "static final String FILE_LIST_REGEX". Further in method "parseFileList(final String entry)" also migrated and archived datasets should be considered
@garydgregory
Copy link
Member

@haegar9766
Thank you for your PR. Please add unit tests.

@haegar9766
Copy link
Contributor Author

@garydgregory
How could i provide a unit test for this? To test the code, the appropriate environment is needed. In this case an MVS system with FTP server and user datasets. For a unit test datasets with e.g. RECFM=FBA and migrated datasets have to be available.

@garydgregory
Copy link
Member

@garydgregory How could i provide a unit test for this? To test the code, the appropriate environment is needed. In this case an MVS system with FTP server and user datasets. For a unit test datasets with e.g. RECFM=FBA and migrated datasets have to be available.

Uh? By updating the existing test for the class you're modifying...

Additional ftp return strings for migrated datasets and datasets with recfm containing ASA (e.g. FBA)
@haegar9766
Copy link
Contributor Author

@garydgregory
Sorry for the misunderstanding. I now also updated the existing test class "MVSFTPEntryParserTest".

@garydgregory
Copy link
Member

@haegar9766
Thank you for your update.
Run mvn locally before your push to catch these build failures.

@haegar9766
Copy link
Contributor Author

@garydgregory
After fixing code style errors "mvn" could now build my branch without any errors.

@garydgregory garydgregory merged commit 0d7c9cc into apache:master Sep 13, 2023
8 checks passed
@garydgregory garydgregory changed the title Change Class "org.apache.commons.net.ftp.parser.MVSFTPEntryParser" to support more datasets Change class org.apache.commons.net.ftp.parser.MVSFTPEntryParser to support more datasets Sep 13, 2023
asfgit pushed a commit that referenced this pull request Sep 13, 2023
support more datasets #182

- Javadoc
- Simplify
- Don't scan entry twice
@haegar9766 haegar9766 deleted the Fixing-of-MVSFTPEntryParser branch September 14, 2023 04:44
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