Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public LinkedHashMap<String,S> process() throws IOException, CompoundNotFoundExc
* time before the first result is available.<br>
* <b>N.B.</b>
* <ul>
* <li>This method ca't be called after calling its NO-ARGUMENT twin.</li>
* <li>remember to close the underlying resource when you are done.</li>
* <li>This method can't be called after calling its NO-ARGUMENT twin.</li>
* <li>remember to close the underlying resource when you are done, by using {@link #close()}.</li>
* </ul>
* @see #process()
* @author Amr AL-Hossary
Expand All @@ -136,7 +136,7 @@ public LinkedHashMap<String,S> process() throws IOException, CompoundNotFoundExc
*/
public LinkedHashMap<String,S> process(int max) throws IOException, CompoundNotFoundException {
LinkedHashMap<String,S> sequences = new LinkedHashMap<String,S>();
@SuppressWarnings("unchecked")

int i=0;
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
while(true) {
Expand All @@ -145,6 +145,7 @@ public LinkedHashMap<String,S> process(int max) throws IOException, CompoundNotF
String seqString = genbankParser.getSequence(br, 0);
//reached end of file?
if(seqString==null) break;
@SuppressWarnings("unchecked")
S sequence = (S) sequenceCreator.getSequence(seqString, 0);
genbankParser.getSequenceHeaderParser().parseHeader(genbankParser.getHeader(), sequence);

Expand All @@ -165,8 +166,6 @@ public LinkedHashMap<String,S> process(int max) throws IOException, CompoundNotF

sequences.put(sequence.getAccession().getID(), sequence);
}
br.close();
close();
return sequences;
}

Expand Down