File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor

Ivan Krizsan
Ranch Hand
Posts: 2198
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When trying to write the following test using MockFor or StubFor to mock/stub an ArrayList, the test fails with a StackOverflowError. The console output is just one single line: "Entering insertItemIntoList: 0"
However, when replacing the ArrayList type with Vector or LinkedList, everything works as it should.
Anyone has any idea why this happens?
Thanks in advance!

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic