File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor" Watch "StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor" New topic
Author

StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor

Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2186
Hi!
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!

 
 
subject: StackOverflowError When Mocking/Stubbing an ArrayList with MockFor or StubFor
 
Threads others viewed
Hibernate Query
1000 characters
mapping between JSP n form
Example of using Groovy Closure for a different programming style
how can I add some stuff in returned List?

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture