cloud1105 / mockito

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

Typo in Whitebox.getInternalState() exception says "Unable to *set* internal state on a private field" #426

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I am doing *get*InternalState(), I see an exception saying "Unable to 
*set* internal state on a private field". This is rather nuts, as I do not want 
to *set* any state!

Original issue reported on code.google.com by headcrashing on 13 Mar 2013 at 1:45

GoogleCodeExporter commented 8 years ago
I don't understand your problem. Could you add more description to the issue 
and a reproducible test case ?

Cheers,
Brice

Original comment by brice.du...@gmail.com on 13 Mar 2013 at 2:04

GoogleCodeExporter commented 8 years ago
Oh ok, I get it you are using Whitebox.
Please dont use internal stuff, they might be removed or changed at any point 
in time. Anyway while the message is wrong (says 'set' instead of 'get'), there 
is another issue that should be displayed in the causes of the stacktrace.

Original comment by brice.du...@gmail.com on 13 Mar 2013 at 2:08

GoogleCodeExporter commented 8 years ago

Original comment by brice.du...@gmail.com on 13 Mar 2013 at 2:16

GoogleCodeExporter commented 8 years ago
I do not have any problem. I just wanted to report the typo: When using 
Whitebox.getInternalState() on a non-existing field, the error message is just 
wrong, as it says that I want to do a SET while I actually do a GET. That's 
all. :-)

Original comment by headcrashing on 13 Mar 2013 at 6:33

GoogleCodeExporter commented 8 years ago
OK :)

Still you should avoid using the mockito internal stuff, as this API can change 
without notice.

Cheers,
Brice

Original comment by brice.du...@gmail.com on 14 Mar 2013 at 7:31

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 16 Aug 2014 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:14

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:50