Precondition: package <package> doesn't contain any (non-Test) types.

21 views
Skip to first unread message

Rick Fisk

unread,
Feb 19, 2021, 2:48:50 PM2/19/21
to equalsverifier

I recently started seeing this when runnning tests in a project.

I have one class that tries to verify all of my entities using Equalsverifier.forPackage()


It was working fine until I changed a model class. I'm not sure that this is the cause but thought I'd search around here to see if anyone else had seen this.

I had a couple of enum fields on an entity for which I built a custom jpa converter.

I should mention I'm using Lombok and also excluded a relationship from this same entity due to a recursion problem when loading it through a repository query. (@Tostring.Exclude)

After solving a problem loading data through a repository object, this test began throwing errors. with the above error. I am wondering if I need to ditch the forPackage() strategy and just add toStringVerifier to each individual entity instead.

Just wanted check here first though to see if there might be a simpler fix.

Rick Fisk

unread,
Feb 19, 2021, 3:05:18 PM2/19/21
to equalsverifier
Emily Latella moment. After looking through the source, I realized that EV was not lying to me., I had previously misspelled the package name and refactored but the IDE didn't catch the string which contained the package name being passed to EV. Doh!

All is well.

Jan Ouwens

unread,
Feb 22, 2021, 2:10:22 AM2/22/21
to equalsv...@googlegroups.com, Rick Fisk
Haha, I'm glad everything worked out!

I had to look up who Emily Latella was, so I learned something as well 😉

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/equalsverifier/06b453a8-bee6-4c9a-b5ac-1131338df07fn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages