Simplify, cope with nulls.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2740 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2010-02-10 00:59:54 +00:00
parent 420df91056
commit b4c32aeb84
+2 -3
View File
@@ -244,13 +244,12 @@ public class CDDB
// read the matches from the server
ArrayList<Entry> list = new ArrayList<Entry>();
String input = _in.readLine();
System.out.println("...: " + input);
while (!input.equals(CDDBProtocol.TERMINATOR)) {
while (input != null && !input.equals(CDDBProtocol.TERMINATOR)) {
System.out.println("...: " + input);
Entry e = new Entry();
e.parse(input);
list.add(e);
input = _in.readLine();
System.out.println("...: " + input);
}
entries = new Entry[list.size()];
list.toArray(entries);