I am running a java program which throws an exception. I am piping the run's output to a grep command where I am checking for a pattern which does not exist, however grep keeps returning a match.
0,2,468.000000
1,2,305.000000
2,5,2702.000000
3,3,1672.000000
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at TestConverter.processPayments(TestConverter.java:113)
at TestConverter.processFile(TestConverter.java:131)
at TestConverter.main(TestConverter.java:142)
I am running the following command:
java -classpath TestConverter.jar TestConverter test_xml.xml | grep "stringthatdoesnotmatch*"
I get the following output:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at TestConverter.processPayments(TestConverter.java:113)
at TestConverter.processFile(TestConverter.java:131)
at TestConverter.main(TestConverter.java:142)
I am not sure why this is happening. Furthermore, my end goal is to check if the output contains the following pattern:
*java.lang.IndexOutOfBoundsException*ArrayList.java:653*TestConverter.java:142*