You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prelude. This is probably an incomplete report, sorry, I plan on coming back to this, but need a stopping point.
the big problem I'm having is "what argument, what are you calling/trying to do?" I'm not certain that what equalsverifier is trying to do is wrong, but rather the error is confusing
Steps to reproduce
... I wish I understood peoples custom bug report templates more, it seems all steps to reproduce asked for later...
Error message and version number
EqualsVerifier found a problem in class com.xenoterracide.model.security.User.
-> argument type mismatch
For more information, go to: https://www.jqno.nl/equalsverifier/errormessages
(EqualsVerifier 3.16.2, JDK 21.0.2 running on classpath, on Linux)
java.lang.AssertionError: EqualsVerifier found a problem in class com.xenoterracide.model.security.User.
-> argument type mismatch
For more information, go to: https://www.jqno.nl/equalsverifier/errormessages
(EqualsVerifier 3.16.2, JDK 21.0.2 running on classpath, on Linux)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.verify(SingleTypeEqualsVerifierApi.java:354)
at com.xenoterracide.model.security.UserTest.equality(UserTest.java:45)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:65)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.lambda$callRecordConstructor$4(RecordObjectAccessor.java:146)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:34)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.callRecordConstructor(RecordObjectAccessor.java:145)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.makeAccessor(RecordObjectAccessor.java:124)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.scramble(RecordObjectAccessor.java:66)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:225)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedObject(ClassAccessor.java:199)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.FallbackFactory.giveInstances(FallbackFactory.java:99)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.FallbackFactory.createValues(FallbackFactory.java:40)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.createTuple(PrefabValues.java:189)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.realizeCacheFor(PrefabValues.java:172)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.AbstractGenericFactory.determineAndCacheActualTypeTag(AbstractGenericFactory.java:56)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.AbstractGenericFactory.determineAndCacheActualTypeTag(AbstractGenericFactory.java:42)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.SimpleGenericFactory.createValues(SimpleGenericFactory.java:36)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.createTuple(PrefabValues.java:185)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.realizeCacheFor(PrefabValues.java:172)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.giveTuple(PrefabValues.java:93)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.giveOther(PrefabValues.java:131)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.lambda$changeField$2(FieldModifier.java:119)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.wrappedChange(FieldModifier.java:140)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.lambda$change$3(FieldModifier.java:135)
at nl.jqno.equalsverifier.internal.util.Rethrow.lambda$rethrow$1(Rethrow.java:51)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:34)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:49)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:59)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.change(FieldModifier.java:135)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.changeField(FieldModifier.java:122)
at nl.jqno.equalsverifier.internal.reflection.InPlaceObjectAccessor.scrambleInternal(InPlaceObjectAccessor.java:80)
at nl.jqno.equalsverifier.internal.reflection.InPlaceObjectAccessor.scramble(InPlaceObjectAccessor.java:58)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:225)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:210)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedObject(ClassAccessor.java:186)
at nl.jqno.equalsverifier.internal.util.Configuration.ensureUnequalExamples(Configuration.java:219)
at nl.jqno.equalsverifier.internal.util.Configuration.build(Configuration.java:114)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.buildConfig(SingleTypeEqualsVerifierApi.java:428)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.performVerification(SingleTypeEqualsVerifierApi.java:414)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.verify(SingleTypeEqualsVerifierApi.java:350)
... 4 more
Caused by: java.lang.ClassCastException: Cannot cast java.lang.Object to com.xenoterracide.model.EntityIdentifier
at java.base/java.lang.Class.cast(Class.java:4067)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
... 43 more
argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:65)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.lambda$callRecordConstructor$4(RecordObjectAccessor.java:146)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:34)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.callRecordConstructor(RecordObjectAccessor.java:145)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.makeAccessor(RecordObjectAccessor.java:124)
at nl.jqno.equalsverifier.internal.reflection.RecordObjectAccessor.scramble(RecordObjectAccessor.java:66)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:225)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedObject(ClassAccessor.java:199)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.FallbackFactory.giveInstances(FallbackFactory.java:99)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.FallbackFactory.createValues(FallbackFactory.java:40)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.createTuple(PrefabValues.java:189)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.realizeCacheFor(PrefabValues.java:172)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.AbstractGenericFactory.determineAndCacheActualTypeTag(AbstractGenericFactory.java:56)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.AbstractGenericFactory.determineAndCacheActualTypeTag(AbstractGenericFactory.java:42)
at nl.jqno.equalsverifier.internal.prefabvalues.factories.SimpleGenericFactory.createValues(SimpleGenericFactory.java:36)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.createTuple(PrefabValues.java:185)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.realizeCacheFor(PrefabValues.java:172)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.giveTuple(PrefabValues.java:93)
at nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues.giveOther(PrefabValues.java:131)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.lambda$changeField$2(FieldModifier.java:119)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.wrappedChange(FieldModifier.java:140)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.lambda$change$3(FieldModifier.java:135)
at nl.jqno.equalsverifier.internal.util.Rethrow.lambda$rethrow$1(Rethrow.java:51)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:34)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:49)
at nl.jqno.equalsverifier.internal.util.Rethrow.rethrow(Rethrow.java:59)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.change(FieldModifier.java:135)
at nl.jqno.equalsverifier.internal.reflection.FieldModifier.changeField(FieldModifier.java:122)
at nl.jqno.equalsverifier.internal.reflection.InPlaceObjectAccessor.scrambleInternal(InPlaceObjectAccessor.java:80)
at nl.jqno.equalsverifier.internal.reflection.InPlaceObjectAccessor.scramble(InPlaceObjectAccessor.java:58)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:225)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedAccessor(ClassAccessor.java:210)
at nl.jqno.equalsverifier.internal.reflection.ClassAccessor.getRedObject(ClassAccessor.java:186)
at nl.jqno.equalsverifier.internal.util.Configuration.ensureUnequalExamples(Configuration.java:219)
at nl.jqno.equalsverifier.internal.util.Configuration.build(Configuration.java:114)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.buildConfig(SingleTypeEqualsVerifierApi.java:428)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.performVerification(SingleTypeEqualsVerifierApi.java:414)
at nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.verify(SingleTypeEqualsVerifierApi.java:350)
at com.xenoterracide.model.security.UserTest.equality(UserTest.java:45)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.ClassCastException: Cannot cast java.lang.Object to com.xenoterracide.model.EntityIdentifier
at java.base/java.lang.Class.cast(Class.java:4067)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
... 43 more
Cannot cast java.lang.Object to com.xenoterracide.model.EntityIdentifier
java.lang.ClassCastException: Cannot cast java.lang.Object to com.xenoterracide.model.EntityIdentifier
note: this gives me a good idea, but no fieldname, and I'm not sure why an object is trying to be casted to that interface atm.
privatefinal@TransientList<DomainEvent<?, ID, THIS, ?>> domainEvents = newArrayList<>();
/** * NO-OP parent constuctor for JPA only. */protectedAbstractAggregate() {}
/** * Instantiates a new Abstract aggregate. * * @param id the id */protectedAbstractAggregate(@NonNullIDid) {
super(id);
}
/** * Registers domain events. * * @param event the event */protectedvoidregisterEvent(@NonNullDomainEvent<?, ID, THIS, ?> event) {
this.domainEvents.add(event);
this.markDirty();
}
Additional context
I think if the error told me what field path it was trying to create that'd be helpful, the only reason I might be able to figure this out is that it has to be creating a DomainEvent.payload because nothing else has that.
The text was updated successfully, but these errors were encountered:
Describe the bug
prelude. This is probably an incomplete report, sorry, I plan on coming back to this, but need a stopping point.
the big problem I'm having is "what argument, what are you calling/trying to do?" I'm not certain that what equalsverifier is trying to do is wrong, but rather the error is confusing
Steps to reproduce
... I wish I understood peoples custom bug report templates more, it seems all steps to reproduce asked for later...
Error message and version number
note: this gives me a good idea, but no fieldname, and I'm not sure why an object is trying to be casted to that interface atm.
Code: EqualsVerifier invocation
Code: class under test
I know, this is insufficient and not simple, I'll come back to this part and give you something better.
Additional context
I think if the error told me what field path it was trying to create that'd be helpful, the only reason I might be able to figure this out is that it has to be creating a DomainEvent.payload because nothing else has that.
The text was updated successfully, but these errors were encountered: