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
When performing a type name refactor using the sniperjavapretty printer, I get the error: The element of class class spoon.support.reflect.declaration.CtRecordImpl does not have CtRole.PARAMETER.
The stack trace is as shown below:
Exception in thread "main" spoon.SpoonException: The element of class class spoon.support.reflect.declaration.CtRecordImpl does not have CtRole.PARAMETER
at spoon.reflect.meta.impl.RoleHandlerHelper.getRoleHandler(RoleHandlerHelper.java:54)
at spoon.support.sniper.internal.ElementSourceFragment.getRoleHandler(ElementSourceFragment.java:271)
at spoon.support.sniper.internal.ElementSourceFragment.addChild(ElementSourceFragment.java:244)
at spoon.support.sniper.internal.ElementSourceFragment$1.enter(ElementSourceFragment.java:202)
at spoon.reflect.visitor.CtScanner.visitCtParameter(CtScanner.java:699)
at spoon.support.reflect.declaration.CtParameterImpl.accept(CtParameterImpl.java:56)
at spoon.reflect.visitor.EarlyTerminatingScanner.doScan(EarlyTerminatingScanner.java:145)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:121)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:189)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:106)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:83)
at spoon.reflect.visitor.CtScanner.visitCtConstructor(CtScanner.java:394)
at spoon.support.reflect.declaration.CtConstructorImpl.accept(CtConstructorImpl.java:48)
at spoon.reflect.visitor.EarlyTerminatingScanner.doScan(EarlyTerminatingScanner.java:145)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:121)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:189)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:106)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:83)
at spoon.reflect.visitor.CtScanner.visitCtRecord(CtScanner.java:1073)
at spoon.support.reflect.declaration.CtRecordImpl.accept(CtRecordImpl.java:100)
at spoon.reflect.visitor.EarlyTerminatingScanner.doScan(EarlyTerminatingScanner.java:145)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:121)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:189)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:106)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:83)
at spoon.reflect.visitor.EarlyTerminatingScanner.visitCtCompilationUnit(EarlyTerminatingScanner.java:160)
at spoon.support.reflect.declaration.CtCompilationUnitImpl.accept(CtCompilationUnitImpl.java:408)
at spoon.reflect.visitor.EarlyTerminatingScanner.doScan(EarlyTerminatingScanner.java:145)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:121)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:189)
at spoon.reflect.visitor.EarlyTerminatingScanner.scan(EarlyTerminatingScanner.java:106)
at spoon.support.sniper.internal.ElementSourceFragment.createSourceFragmentsFrom(ElementSourceFragment.java:230)
at spoon.support.reflect.declaration.CtCompilationUnitImpl.getOriginalSourceFragment(CtCompilationUnitImpl.java:360)
at spoon.support.modelobs.SourceFragmentCreator.onChange(SourceFragmentCreator.java:32)
at spoon.support.modelobs.ChangeCollector$ChangeListener.onObjectUpdate(ChangeCollector.java:176)
at spoon.support.reflect.reference.CtReferenceImpl.setSimpleName(CtReferenceImpl.java:65)
at spoon.refactoring.Refactoring.changeTypeName(Refactoring.java:58)
at com.netflix.rewrite.MigrationV2.lambda$main$3(MigrationV2.java:54)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:174)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at com.netflix.rewrite.MigrationV2.main(MigrationV2.java:54)
The text was updated successfully, but these errors were encountered:
aebute1
changed the title
SniperJavaPrettyPrinter fails because CtRecord does not identify CtParameter role
[Bug] SniperJavaPrettyPrinter fails because CtRecord does not identify CtParameter role
Sep 3, 2024
When performing a type name refactor using the sniperjavapretty printer, I get the error:
The element of class class spoon.support.reflect.declaration.CtRecordImpl does not have CtRole.PARAMETER
.The stack trace is as shown below:
The text was updated successfully, but these errors were encountered: