Bug in CVSRepositoryAdapter, and a fix

"Borchert, Rick" <[email protected]> Sat, 18 Jan 2003 12:50:01 -0600
Newsgroups gmane.comp.java.anthill.devel
Message-ID <006b01c2bf22$6e23fa00$6601a8c0@WPG00302>
This is a multi-part message in MIME format.

------=_NextPart_000_0068_01C2BEF0.1D5D56C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

When I do a "force build" my builds work fine, when I do a normal =
build,
either scheduled or on demand, I end up in an infinite loop in the
CVSRepositoryAdapter. This happens while it is parsing the output of =
the
CVS log command, and happens whether there are modifications or not.
=20
I guess there must be something unusual about the results of my CVS =
log,
or everyone would have this problem... but the infinite loop is in the
parseLogCommandResultRevisionBlock method, about 21 lines in, in the
while loop that starts with "while (!newFile)". All the control
structures in the loop check for "line !=3D null", but the while loop
itself doesn't. In parsing my log output, sure enough, line ends up =
null
and the loop runs for ever. If I change the loop control to "while =
(line
!=3D null && !newFile)" then everything seems to work fine - building =
if
there are mods and not building if there aren't.
=20
I'm running AntHill 1.5.40.11 and cvsnt 1.11.1.3 on Windows 2000
=20
Rick Borchert=20
Senior Consultant / Technical Architect=20
Online Business Systems=20
Email: [email protected] <mailto:[email protected]> =20


------=_NextPart_000_0068_01C2BEF0.1D5D56C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>

<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>When I do a "force build" my builds =
work fine, when=20
I do a normal build, either scheduled or on demand, I end up in an =
infinite loop=20
in the CVSRepositoryAdapter. This happens while it is parsing the =
output of the=20
CVS log command, and happens whether there are modifications or=20
not.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I guess there must be something =
unusual about the=20
results of my CVS log, or everyone would have this problem... but the =
infinite=20
loop is in the parseLogCommandResultRevisionBlock method, about 21 =
lines=20
in,&nbsp;in the while loop that starts with "while (!newFile)". All the =
control=20
structures in the loop check for "line !=3D null", but the while loop =
itself=20
doesn't. In parsing my log output, sure enough, line ends up null and =
the loop=20
runs for ever. If I change the loop control to "while (line !=3D null =
&amp;&amp;=20
!newFile)" then everything seems to work fine - building if there are =
mods and=20
not building if there aren't.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm running AntHill 1.5.40.11 and =
cvsnt 1.11.1.3 on=20
Windows 2000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Rick Borchert <BR>Senior Consultant / =
Technical=20
Architect <BR>Online Business Systems <BR>Email: <A=20
href=3D"mailto:[email protected]">[email protected]</A>=20
<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_0068_01C2BEF0.1D5D56C0--