james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: fix for bug 20370
Date Wed, 04 Jun 2003 18:07:56 GMT
Richard,

Thanks for the feedback.

> 1. If this code receives a loner and then an EOF before a CRLF I
>    believe it will return null, not throw an Exception.

That was the case previously, too, which is why I put those comments next to
your code.  If there is a change for EOF, it seems orthogonal.

> 2. I would suggest renaming TerminationError to "something"Exception

Done.

> the comment should say //abnormal character, (or some such).

Done.

> I do not see an advantage in consuming the misplaced
> character only to throw an exception about it later.

> I would be inclined to throw the exception immediately
> upon recognition of the misplaced character.

You'd have dangling data still in the stream, thus corrupting the next line.
Something like:

   command arg<lf>ument <crlf>

would generate two errors:

 command arg<lf>
 501 Syntax error in parameters or arguments at 11. CR and LF must be CRLF
paired.

 ument <crlf>
 500 amitower Syntax error, command unrecognized: ument

My first thought had been to throw the exception immediately, but then I
realized the above issue.

	--- Noel


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


Mime
View raw message