Skip to content

Commit e08fbb9

Browse files
committed
NET-639 - MVSFTPEntryParser.preParse - MVS, z/OS - allow for merged Ext/Used fields
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/net/trunk@1800686 13f79535-47bb-0310-9956-ffa450edef68
1 parent 24dd750 commit e08fbb9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ This is mainly a bug-fix release. See further details below.
7474
The examples are not part of the public API, so this does not affect compatibility.
7575
7676
">
77+
<action issue="NET-639" type="fix" dev="sebb" due-to=" Alexander Eller">
78+
MVSFTPEntryParser.preParse - MVS, z/OS - allow for merged Ext/Used fields
79+
</action>
7780
<action issue="NET-636" type="fix" dev="sebb">
7881
examples should be in org.apache.commons.net subpackage
7982
</action>

src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public class MVSFTPEntryParser extends ConfigurableFTPFileEntryParserImpl {
6666
"\\S+\\s+" + // unit - ignored
6767
"\\S+\\s+" + // access date - ignored
6868
"\\S+\\s+" + // extents -ignored
69-
"\\S+\\s+" + // used - ignored
69+
// If the values are too large, the fields may be merged (NET-639)
70+
"(?:\\S+\\s+)?" + // used - ignored
7071
"[FV]\\S*\\s+" + // recfm - must start with F or V
7172
"\\S+\\s+" + // logical record length -ignored
7273
"\\S+\\s+" + // block size - ignored

src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public class MVSFTPEntryParserTest extends FTPParseTestFramework {
4242
"PSMLC6 3390 2005/04/05 1 1 VB 27994 27998 PS file7.O.BU",
4343
"FPFS49 3390 2004/06/23 1 1 FB 128 6144 PO-E INCOMING.RPTBM026.D061704",
4444
"FPFS41 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.RPTBM056.D061704",
45-
"FPFS25 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.WTM204.D061704", };
45+
"FPFS25 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.WTM204.D061704",
46+
"PEX26F 3390 2017/07/03 115807 FB 29600 29600 PS INCOMING.FIN.D170630.T160630",
47+
};
4648

4749
private static final String[] goodsamplesMemberList = {
4850
/* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */

0 commit comments

Comments
 (0)