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
public record SafeRange(@NullableLocalDatestart,
@NullableLocalDateend)
implementsDateRange {
publicSafeFiniteRangetoFinite() {
if (start == null)
thrownewIllegalStateException();
if (end == null)
thrownewIllegalStateException();
returnnewSafeFiniteRange(start, end);
}
}
Pitest mutations die with the following stack trace:
stdout : java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the class NestHost, NestMembers, Record, or PermittedSubclasses attribute
stdout : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
stdout : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:195)
stdout : at org.pitest.boot.HotSwapAgent.hotSwap(HotSwapAgent.java:46)
stdout : at org.pitest.mutationtest.execute.CatchNewClassLoadersTransformer.setMutant(CatchNewClassLoadersTransformer.java:44)
stdout : at org.pitest.mutationtest.execute.HotSwap.insertClass(HotSwap.java:18)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.handleCoveredMutation(MutationTestWorker.java:152)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.handleMutation(MutationTestWorker.java:133)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.processMutation(MutationTestWorker.java:115)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.run(MutationTestWorker.java:85)
stdout : at org.pitest.mutationtest.execute.MutationTestMinion.run(MutationTestMinion.java:97)
stdout : at org.pitest.mutationtest.execute.MutationTestMinion.main(MutationTestMinion.java:153)
Removing the annotations makes the error go away.
The text was updated successfully, but these errors were encountered:
Thanks for the report and reproduction example. My best guess here is that ASM is reordering an attribute behind the scenes, but this wouldn't explain why the first mutant inserts succesfully.
The code with the issue can be found at: https://github.com/chaosflaws/pitest-record-annotations-bug, should be reproducible with
mvn verify
.In this snippet:
Pitest mutations die with the following stack trace:
Removing the annotations makes the error go away.
The text was updated successfully, but these errors were encountered: