This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
fix for fhpd buglet
- From: Tom Tromey <tromey at redhat dot com>
- To: Frysk List <frysk at sourceware dot org>
- Date: Wed, 16 May 2007 10:41:23 -0600
- Subject: fix for fhpd buglet
- Reply-to: tromey at redhat dot com
I tried fhpd today and I noticed that if I typed Control-D at the
prompt, it threw a null pointer exception. Patch appended.
Tom
Index: frysk-core/frysk/bindir/ChangeLog
from Tom Tromey <tromey@redhat.com>
* fhpd.java (main): Exit loop if line==null.
Index: frysk-core/frysk/bindir/fhpd.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/bindir/fhpd.java,v
retrieving revision 1.8
diff -u -r1.8 fhpd.java
--- frysk-core/frysk/bindir/fhpd.java 3 May 2007 20:29:39 -0000 1.8
+++ frysk-core/frysk/bindir/fhpd.java 16 May 2007 16:56:15 -0000
@@ -125,7 +125,7 @@
reader.addCompletor(fhpdCompletor);
try {
cli.execCommand(line);
- while (! (line.equals("quit") || line.equals("q")))
+ while (line != null && ! (line.equals("quit") || line.equals("q")))
{
line = reader.readLine(cli.getPrompt());
cli.execCommand(line);