SikuliX1
SikuliX1 copied to clipboard
Region class: waitBest hit IndexOutOfBoundsException
My cases:
- Bigger image is the first, and the second is the matching image. This will throw an exception.
- The first is the matching image, and the second is a bigger image. This will show the first image matched.
Because here. results.add((Integer) current[0], (Long) current[1]); get exception Index of outbound for case 1 Cannot add index 1 to empty list.
for (Future result : fResults) { try { Object[] current = (Object[]) result.get(); maxDuration = Math.max((Long) current[1], maxDuration); results.add((Integer) current[0], (Long) current[1]); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } }