commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <>
Subject Re: [NET] Re: Please Help me !! listFiles() return null
Date Wed, 24 Mar 2004 12:36:40 GMT
I've looked at bug 27858 and agree that it is a problem.  I will comment in 
more detail on bugzilla.

However, I don't think this could be responsible for Mr. Cuomo's 
NullPointerException problem.  In the latest code base check out
FtpFileEntryParserImpl.preParse() which weeds out any entries the parser 
failed to parse.  While that is probably not the version used by Mr. Cuomo, 
I'm fairly certain that the release version also removed unparseable entries 
although in a different way.  (In the most recent released version, the 
preParse() method did not exist).

In fact, a later Email from Mr. Cuomo mentions that by changing the NT file 
entry parser to use a unix-style display the problem goes away.  This leads 
me to think he was trying to use the default Unix parser on an NT system when 
he should have been using the NT parser.

On Wednesday 24 March 2004 4:14 am, Mario Ivankovits wrote:
> Fabio Cuomo wrote:
> > i get a null
> > return null pointer while if i use
> It would be great if you could post the stacktrace to see where it is
> thrown.
> Is it really listFiles() which throws the excpetion?
> On what operating system do the ftp-server run?
> I have tried your example and it worked fine with my linux host.
> If one of the FTPFile Entries are null and this cause your
> NullPointerException, than this is due to a bug in UnixFtpEntryParser.
> Currently files with permissions other than "rwx" cause the FTPClient to
> return null values.
> I already filed a bug about this
> (
> As a workaround you could copy UnixFtpEntryParser and change the regexp
> + "(((r|-)(w|-)(x|-))((r|-)(w|-)(x|-))((r|-)(w|-)(x|-)))\\s+"
> to
> +
> "(((r|-)(w|-)(x|X|s|S|t|-))((r|-)(w|-)(x|X|s|S|t|-))((r|-)(w|-)(x|X|s|S|t|-
> You have to pass this parser to listFiles then.
> Ciao,
> Mario
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message