Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in Java FTP by
VMSFileParser doesn't work right when
try to parse [group,owner] part.
Cause our OpenVMS FTP servers print out only [user] data.

Other minority bug is when create FTPFileFactory using constructor
public FTPFileFactory(FTPFileParser parser) and
FTPFileParser is VMSFileParser it doesn't initialise variable usingVMS.

2 Answers

0 votes
by
dir -command at openvms system:

TCPIP$FTP_SERVER.LOG;4
1/35 14-DEC-2005 13:51:36 [USER_FOO] (RWED,RWED,RE,)
TCPIP$FTP_SERVER.LOG;3
1/35 14-DEC-2005 13:51:26 [USER_FOO] (RWED,RWED,RE,)
TCPIP$FTP_SERVER.LOG;2
1/35 14-DEC-2005 13:47:33 [USER_FOO] (RWED,RWED,RE,)
TCPIP$FTP_SERVER.LOG;1
1/35 14-DEC-2005 13:39:02 [USER_FOO] (RWED,RWED,RE,)
TEST.TXT;1 1/35 14-DEC-2005 13:40:22 [USER_FOO] (RWED,RWED,RE,)
0 votes
by
This worked out this way:

change VMSFilePArser.java lines 187-191:

From:
                if (commaPos < 0) {
                    throw new ParseException("Unable to parse [group,owner] field '" + fields[4] + "'", 0);
                }
                group = fields[4].substring(1, commaPos);
                owner = fields[4].substring(commaPos+1, fields[4].length()-1);



To:
                if (commaPos > 0) {
                    group = fields[4].substring(1, commaPos);
                } else {
                    commaPos = 0;
                }


Basically, this allow the group to be undefined (i.e null).

Categories

...