Closed trevorr closed 9 years ago
When I hacked my build to use jackson 2.5.2 (the version mockserver-netty specifies), the test passes, for whatever reason. However, it seems like jackson 2.2.3 was correct in that Not
shouldn't have two getters. It's not uncommon for other dependencies to want a particular version of jackson, so I'm curious if Not
could be fixed to work with older versions.
This is now fixed.
The main issue is that older versions of Jackson don't seem to understand the different between boolean
and Boolean
. The isNull()
getter is not a valid getter for a Boolean
so the error you are getting is a bug in Jackson, however I have managed to work around that and make this issue go away.
It was more complex then you might expect as these functions are used for two main reasons, first is to support serialisation and de-serialization the second is for the matching process. The matchers I don't want to need to have null checks everywhere, however with Jackson I don't want it to serialise out the value when ever it is false. Thus there needs to be two ways of reading the value, one that is null safe and one that will return null. I've simplified the logic to minimise the use and presence of the null safe getter.
Parameter
indirectly extendsNot
, which implements bothisNot()
andgetNot()
.throws:
I'm using mockserver-netty 3.9.9 and jackson 2.2.3.