Synesso / instinct

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

Stub creator causes NPEs #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As it uses Objenesis, it doesn't call constructor args, so any method that 
depends on constructor 
args could throw NPEs.

Better solution would be to fill out all constructor params (and possibly 
descend recursively with 
stub creator).

Another option is to wrap a proxy, and intercept method calls and create a stub 
for the return 
type. This approach probably breaks the expected behaviour of methods such as 
toString(), etc.

Note. in head, not in release build.

Original issue reported on code.google.com by tomjad...@gmail.com on 15 Nov 2007 at 10:49