Closed vcaldas closed 9 years ago
This bug happens in the StringOperations class. When, in the getArguments method, the allMatches array list is empty you cannot get the first element out of it allMatches.get(0).equalsIgnoreCase() on line 46.
@vcaldas I added a check if (allMatches.size() > 0) {
on line 46 in StringOperations.java (not committed yet) but I don't know what the consequences of this will be. The method will then return an empty string. Is this allowed?
Pull the last version. I changed quite a bit to make a better use of the plugins. I'll check if the error is still there after the updade.
Problem is solved in the new version.
In the master branch there is still no check for the size. Did you push your fix already into the master branch?
Yes. It is there. I think the size checking is not necessary no.w Check the code and confirm if you are getting the same result https://github.com/SingleMolecule/iSBatch/blob/master/src/operations/peakFinder/FindPeaksOperation.java
I still added the check in the StringOperations class, just to prevent this exception. What did you change in the FindPeaksOperation?
It calls the plugin directly now and execute all with same conditions. Before was a code repetition.
Submitted by Andrew Robinson. Exception in thread "Run$_Thread-11" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at utils.StringOperations.getArguments(StringOperations.java:46) at operations.peakFinder.FindPeaksOperation.run(FindPeaksOperation.java:257) at operations.peakFinder.FindPeaksOperation.runNode(FindPeaksOperation.java:173) at operations.peakFinder.FindPeaksOperation.visit(FindPeaksOperation.java:143) at model.Sample.accept(Sample.java:29) at operations.OperationRunner.run(OperationRunner.java:52) at java.lang.Thread.run(Thread.java:695)