Menu

#30 Critical: NEED 0.9.1 CallSequence.reset NOT resets callIndex

open
nobody
None
9
2004-05-28
2004-05-28
No

Hi, gang! Awesome job, well done!

I see that lots has happened since 0.9, but I'm pledging
you the world needs 0.9.1 release!

com.mockobjects.dynamic.CallSequence.reset()

does not reset callIndex to zero, making reset() unusable.

Here's the fix:

public void reset()
{
this.expectedCalls.clear();
this.matchedCalls.reset();
+ callIndex = 0;
}

PLEASE, DO ROLL OUT A 0.9.1, IT'S REALLY CRITICAL

Discussion

  • Anton Tagunov

    Anton Tagunov - 2004-05-28
    • priority: 5 --> 9
     
  • Anton Tagunov

    Anton Tagunov - 2004-05-28

    The fix.

     
  • Nobody/Anonymous

    Logged In: NO

    Also we would benefit from NPE fixes in DynamicUtil

     
  • Steve Freeman

    Steve Freeman - 2004-05-28

    Logged In: YES
    user_id=123464

    Can you send in a test that generates the NPE failures you
    describe?

     
  • Nobody/Anonymous

    Logged In: NO

    I'm really sorry I have been misunderstood.

    The NPE fixes have already been in the CVS for 6 months or so

    http://cvs.sourceforge.net/viewcvs.
    py/mockobjects/mockobjects-java/src/core/com/mockobjects/
    dynamic/DynamicUtil.java?r1=1.2&r2=1.7

    I think that the first and third changes should go to 9.1.

    (The second one probably shouldn't go to 9.1 as it looks to be
    part of major refactoring happened after 0.9)

    In particular the third change in this diff fixes an NPE which is
    VERY easy to hit.

    Cheers! :-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.