Error in spring environment
It works well on unit testing, but failed in my spring enterprise environment. Is QuickBuilder for testing only?
The error seems weird: java.lang.ClassCastException: cc.foo.data.entity.SzlbProposalEntity$SzlbProposalBuilder__quickbuilder__ cannot be cast to cc.foo.data.entity.SzlbProposalEntity$SzlbProposalBuilder at cc.foo.data.entity.SzlbProposalEntity.builder(SzlbProposalEntity.java:67) at cc.foo.data.entity.SzlbProposalEntity.builder(SzlbProposalEntity.java:76)
public static interface SzlbProposalBuilder extends org.pitest.quickbuilder.Builder<SzlbProposalEntity> {
QuickBuilder is intended for use in tests. This doesn't mean it couldn't be used for production code, but it isn't something I'd personally choose to do as I prefer to keep the amount of "magic" there to a minimum.
It looks like spring has created a sub class of the SzlbProposalBuilder. I'd have to see the code in its full context to understand why.