keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

[ ... ] as String[] syntax as argument results in NullPointerException #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have attached a project that reproduces the problem. Just unpack it and run:

    ./gradlew test

The Echo.echo() method uses the syntax:

     output.print(msgs as String[])

which causes GMock to throw a NullPointerException when the 'output' object is 
mocked.

Original issue reported on code.google.com by p.ledbr...@gmail.com on 19 Jul 2010 at 5:41

Attachments:

GoogleCodeExporter commented 8 years ago
I need to look deeper to find if this is a bug of Groovy

Original comment by JohnnyJianHY on 20 Jul 2010 at 3:01

GoogleCodeExporter commented 8 years ago
Thanks Peter for reporting this issue and for the detailed attached sample. 
That one was a bit tricky as Johnny pointed we were not quite sure if it was a 
Groovy bug.

Still not sure if it's Groovy or GMock but the fix involve unwrapping some 
Groovy PojoWrapper that fail the == comparison. I'll try to reproduce it 
without GMock involve and see if the Groovy guru can help.

A release is on its way.

Original comment by julien.g...@gmail.com on 15 Sep 2010 at 6:52

GoogleCodeExporter commented 8 years ago
Should we backport the patch to the 0.7.x branch? I think there must be a same 
bug in that branch.

BTW, I think we should release 0.8.1 and 0.7.1 at the same time.

Original comment by JohnnyJianHY on 15 Sep 2010 at 7:00