commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: [net] NT FTP Server & DIRSTYLE
Date Tue, 06 Apr 2004 01:19:58 GMT
When I first read Mario's proposal I was totally against it.  It seemed to me 
that it must be much more complicated than DIRSTYLE.  I wrote a whole letter 
slamming the idea.  Then I took a good look at Mario's patch.

Now that I have looked it over, I am much more favorable to the idea and 
compliment Mario strongly on his design.

However, there is still one problem that I see:

I don't like the way the Composite parser can vary on every entry.  Any time 
it fails to parse an entry, it reopens the question of what type of parser it 
is.  I think the business about iterating through the possible parsers should 
only happen the first time through.   In other words:

	public FTPFile parseFTPEntry(String listEntry)
	{
        if (cachedFtpFileEntryParser != null)
		{
			FTPFile matched = cachedFtpFileEntryParser.parseFTPEntry(listEntry);
			if (matched != null)
			{
				return matched;
			}
		}
// my changes begin here
	} 
	else
	{
// my changes end here
		for (int iterParser=0; iterParser < ftpFileEntryParsers.length; 
iterParser++)
		{
			FTPFileEntryParser ftpFileEntryParser = ftpFileEntryParsers[iterParser];

			FTPFile matched = ftpFileEntryParser.parseFTPEntry(listEntry);
			if (matched != null)
			{
				cachedFtpFileEntryParser = ftpFileEntryParser;
				return matched;
			}
		}
		return null;
	}

Assuming that all tests pass, I would not have any problem committing this 
with my change.







On Monday 05 April 2004 1:47 pm, Mario Ivankovits wrote:
> Jeffrey D. Brekke wrote:
> >Go for it, I probably won't get around to looking at it until tonight
> > (CST).
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28215
>
> Documented within the Bug-Description and in CompositeFileEntryParser.java
>
> -- Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message