Closed iamanikeev closed 7 years ago
Can you please add some tests describing this issue?
Done. Now if you revert changes in Table, you could see the same error.
java.lang.ArrayIndexOutOfBoundsException: 2
at java.util.Arrays$ArrayList.get(Arrays.java:3841)
at ru.yandex.qatools.htmlelements.element.Table.lambda$null$4(Table.java:157)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at ru.yandex.qatools.htmlelements.element.Table.lambda$getRowsMappedToHeadings$5(Table.java:157)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
Indentations are broken in several places.
Formatted both files with Idea, only 3 places were fixed (see last commit). Is that it, or I'm missing something else? Is there any linter I could use?
LGTM now. Anyway, it looks that PR build is broken in our CI system, i need to fix it before we can merge it.
Can you please squash commits in one?
Done.
test this please
Landed, thank you @iamanikeev !
The following code would fail in case if headings is less then row headers set: