Incorrect information on "instanceof or getClass()" page about EqualsVerifier

5 views
Skip to first unread message

Jaroslaw Pawlak

unread,
Feb 6, 2019, 6:21:26 AM2/6/19
to equalsverifier
https://jqno.nl/equalsverifier/manual/instanceof-or-getclass/

"Well, tools like Hibernate, and many mocking frameworks such as Mockito and EasyMock, use bytecode manipulation tricks to generate subclasses on the fly."

I don't think this sentence is correct. These frameworks simply create a subclass (that's why they require the class to not be final). That's much different than bytecode manipulation that e.g. powermock is doing.

Jan Ouwens

unread,
Feb 7, 2019, 3:53:43 AM2/7/19
to Jaroslaw Pawlak, equalsv...@googlegroups.com
Hi Jaroslaw,

I see your point, but I disagree. Indeed they don't change bytecode that already exists, like Powermock does, but they do generate new bytecode for the subclass that they create. As far as I'm concerned, that also counts as "manipulation" :).
(Also, I want to exaggerate the point a little bit so that people don't take for granted what happens inside Hibernate and mocking frameworks and such.)


Jan
--
You received this message because you are subscribed to the Google Groups "equalsverifier" group.
To unsubscribe from this group and stop receiving emails from it, send an email to equalsverifie...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages