jmockit / jmockit1

Advanced Java library for integration testing, mocking, faking, and code coverage
Other
461 stars 239 forks source link

NullPointerException when updating mock state #167

Closed rfer closed 9 years ago

rfer commented 9 years ago

I've tried to reproduce this issue in an isolated test but wasn't unable to. Either way, this is the stacktrace (or what I could get), it might be useful:

Caused by: java.lang.NullPointerException: null
                at mockit.internal.state.MockClasses.getMock(MockClasses.java:99)
                at mockit.internal.state.TestRun.getMock(TestRun.java:136)
                at mockit.internal.state.TestRun.updateMockState(TestRun.java:121)
rliesenfeld commented 9 years ago

I would really need more information to narrow down the situation where the exception occurs. You could discover the relevant test by setting a conditional breakpoint at MockClass.java:99. Then a simplified version of the test could be posted here, assuming the NPE still happens when it's executed individually.

rfer commented 9 years ago

I'm swamped right now, but I'll try to provide more information as soon as I can.