dhamini-poornachandra / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

NPE using verify with primitive captor using 1.8.5 #222

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Call verify([matcher], [matcher], [captor]) on Oracle's NamedCache.put(Object 
oKey, Object oValue, long cMillis) method.

Example:
verify(mockNamedCache).put(eq(key), eq(value), longCaptor.capture());

What is the expected output? What do you see instead?
I receive a NullPointerException. I expect the verify call to succeed and 
correctly populate the captor.

What version of the product are you using? On what operating system?
Mockito version 1.8.5 on Windows 7.

Please provide any additional information below.
I've attached a simplified file that reproduces the error.

Oracle's Coherence packages can be downloaded here: 
http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html

The API documentation for NamedCache can be found here: 
http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/NamedCa
che.html

Original issue reported on code.google.com by bhforumu...@gmail.com on 7 Oct 2010 at 3:28

Attachments:

GoogleCodeExporter commented 8 years ago
Never mind! It turns out there was an old version of mockito laying around in 
one of the other imports. The old version overwrote the new version which 
caused the NPE. Sorry for the confusion.

Original comment by bhforumu...@gmail.com on 7 Oct 2010 at 3:47

GoogleCodeExporter commented 8 years ago
no problem :)

Original comment by szcze...@gmail.com on 16 Oct 2010 at 10:56