You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functions fails because it was designed to never return null at all, that’s why it falls into an infinite loop. Instead it returns a LinkedHashMap with size in the in the range [0, max], where size < max indicates last (probably incomplete) read batch of sequences.
It should not be called within a
while ((ret = process(int)) != null){/code/}
loop
Instead it should be called within a
do{ret = process(int); /code/} while ( ret.size() < max);
loop
If there is a blank line after the last sequence of the last batch, it fails to interpret it as either a new sequence or a closed stream. I corrected this by passing any blank lines, and adding an EOF flag.
P.S. I made a pull request but I am not sure it will catch the new release.
Activity
fixing #282, adding junit test for verification
fixing #282, adding junit test for verification
andreasprlic commentedon Jun 17, 2015
also added documentation for this to tutorial
https://github.com/biojava/biojava-tutorial/blob/master/core/readwrite.md
aalhossary commentedon Jun 26, 2015
Actually there is no bug there. The function documentation never mentioned that a null might be returned.
The proper way of using the function is
It has been there for a while and others may have been using it
Shall we revert this commit?
andreasprlic commentedon Jun 26, 2015
Please try the test case, it did not work before the patch.
reverting biojava#282 to never return null, managed blank lines anywhere
aalhossary commentedon Jun 27, 2015
I updated the function and the test case
There are two different issues here:
It should not be called within a
while ((ret = process(int)) != null){/code/}
loop
Instead it should be called within a
do{ret = process(int); /code/} while ( ret.size() < max);
loop
P.S. I made a pull request but I am not sure it will catch the new release.
andreasprlic commentedon Jan 14, 2016
not sure why this one is still open, this one got fixed already for last release.
Fix early configuration resolving in Gradle Plugin