Simplify, cope with nulls.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2740 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -244,13 +244,12 @@ public class CDDB
|
|||||||
// read the matches from the server
|
// read the matches from the server
|
||||||
ArrayList<Entry> list = new ArrayList<Entry>();
|
ArrayList<Entry> list = new ArrayList<Entry>();
|
||||||
String input = _in.readLine();
|
String input = _in.readLine();
|
||||||
System.out.println("...: " + input);
|
while (input != null && !input.equals(CDDBProtocol.TERMINATOR)) {
|
||||||
while (!input.equals(CDDBProtocol.TERMINATOR)) {
|
System.out.println("...: " + input);
|
||||||
Entry e = new Entry();
|
Entry e = new Entry();
|
||||||
e.parse(input);
|
e.parse(input);
|
||||||
list.add(e);
|
list.add(e);
|
||||||
input = _in.readLine();
|
input = _in.readLine();
|
||||||
System.out.println("...: " + input);
|
|
||||||
}
|
}
|
||||||
entries = new Entry[list.size()];
|
entries = new Entry[list.size()];
|
||||||
list.toArray(entries);
|
list.toArray(entries);
|
||||||
|
|||||||
Reference in New Issue
Block a user