Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differ crashing with java.lang.IndexOutOfBoundsException when adding line to constructor #1

Open
shpelda opened this issue Feb 23, 2014 · 0 comments

Comments

@shpelda
Copy link

shpelda commented Feb 23, 2014

Hello, please apply following, and run the test:
https://gist.github.com/shpelda/9177654

diffj will crash with

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.incava.diffj.code.StatementList.getRangeAt(StatementList.java:50)
at org.incava.diffj.code.StatementListDifferenceAdd.getFromRange(StatementListDifferenceAdd.java:22)
at org.incava.diffj.code.StatementListDifferenceDelta.process(StatementListDifferenceDelta.java:23)
at org.incava.diffj.code.StatementListDifference.execute(StatementListDifference.java:18)
at org.incava.diffj.code.Block.compareCodeNew(Block.java:55)
at org.incava.diffj.code.Block.compareCode(Block.java:42)
at org.incava.diffj.function.Ctor.compareCode(Ctor.java:45)
at org.incava.diffj.function.Ctor.diff(Ctor.java:31)

Note that assertion in junit is invalid. i just need a way to reproduce the crash.

@shpelda shpelda closed this as completed Feb 23, 2014
@shpelda shpelda reopened this Feb 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant