cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@fztig938.bank.dresdner.net>
Subject RE: [C2 patch] Jikes 1.14
Date Thu, 05 Jul 2001 18:31:14 GMT
Hi Vadim,

On Thu, 5 Jul 2001, Vadim Gritsenko wrote:

> I think I found the problem: I overlooked that fact that when printing the error, jikes
sometimes
> inserts empty string. This should be fixed now. Please test - hope last time.

	Looks good. I get the same output.

> > 	I had explicitly set 'line' to null so the first readline would always
> > 	be executed (check the attached patch).
> 
> This should not be done as line may contain first line of the next error, and every
> error is parsed into separate CompileError object.

	My understanding of the code was different. I thought that:

// first line is not space-starting
if (line == null) line = input.readLine();

	always reads the first line of every error message (if existing), and
	that:

while (true) {
    line = input.readLine();
    ....
    buffer.append(line);
    buffer.append('\n');
}

	reads the rest of the lines for that particular error message.

	On my system, I always have an empty string of length 0 between each
	error message, and at the end of all the error messages.
	
	Hence setting 'line' to null kept everything in sync, as it only
	dropped the zero sized string, and broke control flow out the inner
	while loop - causing the first line of the next error message (if
	existing) to be read by the first statement above.

	Perhaps that's where we were seeing some platform differences ?

	But everything looks good now. Thanks very much for your help. :-)

	Cheers,

	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message