| CARVIEW |
Select Language
HTTP/2 200
date: Thu, 25 Dec 2025 21:18:31 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=263.51887,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=893.527179,nginx;desc="NGINX";dur=0.523121,glb;desc="GLB";dur=98.752044
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: aab62e3
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Ovjy%2BOEXQfNr%2BeAqzFFkFqGTEKzn1GwRAohplsxvf%2FwrPP8tt3FqYGQfHUC6R1zjPm5kMRt2v2bZQfGc0XoiaiyASu4jdSxEVWwENKb9fksgXf7alxj%2FJhmEl7RIRp0M3tn0nQSjqP8TTtqkIrhAZYPmwXO5lIf63MUAtqz5pPRC1IheDWv6BAYVWoejF4LntX4GMM0o0yaWMHQCg3AKsqjYUUua3SqHN0HHgd3BG%2FTJYpUZCIkbCQF4OGIlL5PicBMN8ykkaT3obF2k6lVkFQ%3D%3D--H0won7zCarzxSSKG--PjEEmWW8MhS6k%2F3y1osAKw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1070188866.1766697510; Path=/; Domain=github.com; Expires=Fri, 25 Dec 2026 21:18:30 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 25 Dec 2026 21:18:30 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C2C0:3159FD:2F6F7B0:38C0CCF:694DAA26
[java] IllegalArgumentException: Invalid type reference for method or ctor type annotation: 16 · Issue #5344 · pmd/pmd · GitHub
No one assignedNo typeNo projectsNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
a:bugPMD crashes or fails to analyse a file.PMD crashes or fails to analyse a file.
Milestone
Description
Affects PMD Version:
This is happening since pmd v7, but my test version is 7.7.0
Description:
When a field with not well known types are defined as non private field in an object, pmd is not able to analyse the class and breaks. While when the field is declared final, there is no such issue.
Exception Stacktrace:
20:14:25 [ERROR] Parsing failed in ParseLock#doParse()
20:14:27 java.lang.IllegalArgumentException: Invalid type reference for method or ctor type annotation: 16
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.GenericSigBase$LazyMethodType.acceptAnnotationAfterParse (GenericSigBase.java:397)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.TypeAnnotationHelper$TypeAnnotationSetWithReferences.forEach (TypeAnnotationHelper.java:72)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.GenericSigBase$LazyMethodType.doParse (GenericSigBase.java:256)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.GenericSigBase$1.doParse (GenericSigBase.java:54)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.ParseLock.getFinalStatus (ParseLock.java:33)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.ParseLock.ensureParsed (ParseLock.java:22)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.GenericSigBase.ensureParsed (GenericSigBase.java:76)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.GenericSigBase$LazyMethodType.getParameterTypes (GenericSigBase.java:312)
20:14:27 at net.sourceforge.pmd.lang.java.symbols.internal.asm.ExecutableStub.getArity (ExecutableStub.java:83)
20:14:27 at net.sourceforge.pmd.lang.java.types.JMethodSig.getArity (JMethodSig.java:118)
20:14:27 at net.sourceforge.pmd.lang.java.types.TypeOps.areOverrideEquivalent (TypeOps.java:1323)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet$ContextIndependentSet.shouldTakePrecedence (OverloadSet.java:110)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet$ContextIndependentSet.shouldTakePrecedence (OverloadSet.java:98)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet.add (OverloadSet.java:48)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet$ContextIndependentSet.add (OverloadSet.java:122)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet$ContextIndependentSet.add (OverloadSet.java:98)
20:14:27 at java.util.stream.ReduceOps$3ReducingSink.accept (ReduceOps.java:169)
20:14:27 at java.util.stream.ForEachOps$ForEachOp$OfRef.accept (ForEachOps.java:184)
20:14:27 at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:197)
20:14:27 at java.util.stream.ReferencePipeline$2$1.accept (ReferencePipeline.java:179)
20:14:27 at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1708)
20:14:27 at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
20:14:27 at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
20:14:27 at java.util.stream.ForEachOps$ForEachOp.evaluateSequential (ForEachOps.java:151)
20:14:27 at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential (ForEachOps.java:174)
20:14:27 at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
20:14:27 at java.util.stream.ReferencePipeline.forEach (ReferencePipeline.java:596)
20:14:27 at java.util.stream.ReferencePipeline$7$1.accept (ReferencePipeline.java:276)
20:14:27 at java.util.Iterator.forEachRemaining (Iterator.java:133)
20:14:27 at java.util.Spliterators$IteratorSpliterator.forEachRemaining (Spliterators.java:1939)
20:14:27 at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
20:14:27 at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
20:14:27 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:921)
20:14:27 at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
20:14:27 at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:682)
20:14:27 at net.sourceforge.pmd.lang.java.types.TypeOps.getMethodsOf (TypeOps.java:1910)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:73)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:26)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.computeCompileTimeDecl (Infer.java:303)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.getCompileTimeDecl (Infer.java:281)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.goToInvocationWithFallback (Infer.java:214)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.inferInvocationRecursively (Infer.java:176)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.inferInvocation (PolyResolution.java:263)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.polyTypeOtherCtx (PolyResolution.java:135)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.computePolyType (PolyResolution.java:125)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.handlePoly (LazyTypeResolver.java:358)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:363)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:103)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.acceptVisitor (ASTMethodCall.java:71)
20:14:27 at net.sourceforge.pmd.lang.java.ast.AbstractJavaTypeNode.getTypeMirror (AbstractJavaTypeNode.java:51)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.getTypeMirror (ASTMethodCall.java:22)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:68)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:26)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.computeCompileTimeDecl (Infer.java:303)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.getCompileTimeDecl (Infer.java:281)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.goToInvocationWithFallback (Infer.java:214)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.inferInvocationRecursively (Infer.java:176)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.inferInvocation (PolyResolution.java:263)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.polyTypeOtherCtx (PolyResolution.java:135)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.computePolyType (PolyResolution.java:125)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.handlePoly (LazyTypeResolver.java:358)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:363)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:103)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.acceptVisitor (ASTMethodCall.java:71)
20:14:27 at net.sourceforge.pmd.lang.java.ast.AbstractJavaTypeNode.getTypeMirror (AbstractJavaTypeNode.java:51)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.getTypeMirror (ASTMethodCall.java:22)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:68)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.ast.MethodInvocMirror.getAccessibleCandidates (MethodInvocMirror.java:26)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.computeCompileTimeDecl (Infer.java:303)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.getCompileTimeDecl (Infer.java:281)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.goToInvocationWithFallback (Infer.java:214)
20:14:27 at net.sourceforge.pmd.lang.java.types.internal.infer.Infer.inferInvocationRecursively (Infer.java:176)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.inferInvocation (PolyResolution.java:263)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.polyTypeOtherCtx (PolyResolution.java:135)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.PolyResolution.computePolyType (PolyResolution.java:125)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.handlePoly (LazyTypeResolver.java:358)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:363)
20:14:27 at net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver.visit (LazyTypeResolver.java:103)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.acceptVisitor (ASTMethodCall.java:71)
20:14:27 at net.sourceforge.pmd.lang.java.ast.AbstractJavaTypeNode.getTypeMirror (AbstractJavaTypeNode.java:51)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.getTypeMirror (ASTMethodCall.java:22)
20:14:27 at net.sourceforge.pmd.lang.java.ast.AbstractJavaTypeNode.getTypeMirror (AbstractJavaTypeNode.java:39)
20:14:27 at net.sourceforge.pmd.lang.java.ast.ASTMethodCall.getTypeMirror (ASTMethodCall.java:22)
20:14:27 at net.sourceforge.pmd.lang.java.ast.InternalApiBridge.lambda$forceTypeResolutionPhase$0 (InternalApiBridge.java:92)
20:14:27 at java.util.Iterator.forEachRemaining (Iterator.java:133)
20:14:27 at net.sourceforge.pmd.lang.ast.internal.IteratorBasedNStream.forEach (IteratorBasedNStream.java:102)
20:14:27 at net.sourceforge.pmd.lang.java.ast.InternalApiBridge.forceTypeResolutionPhase (InternalApiBridge.java:90)
20:14:27 at net.sourceforge.pmd.lang.java.internal.JavaAstProcessor.lambda$process$3 (JavaAstProcessor.java:135)
20:14:27 at net.sourceforge.pmd.benchmark.TimeTracker.bench (TimeTracker.java:163)
20:14:27 at net.sourceforge.pmd.lang.java.internal.JavaAstProcessor.process (JavaAstProcessor.java:135)
20:14:27 at net.sourceforge.pmd.lang.java.internal.JavaAstProcessor.process (JavaAstProcessor.java:166)
20:14:27 at net.sourceforge.pmd.lang.java.internal.JavaAstProcessor.process (JavaAstProcessor.java:150)
20:14:27 at net.sourceforge.pmd.lang.java.ast.JavaParser.parseImpl (JavaParser.java:69)
20:14:27 at net.sourceforge.pmd.lang.java.ast.JavaParser.parseImpl (JavaParser.java:25)
20:14:27 at net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeParserAdapter.parse (JjtreeParserAdapter.java:36)
20:14:27 at net.sourceforge.pmd.lang.impl.PmdRunnable.parse (PmdRunnable.java:112)
20:14:27 at net.sourceforge.pmd.lang.impl.PmdRunnable.processSource (PmdRunnable.java:132)
20:14:27 at net.sourceforge.pmd.lang.impl.PmdRunnable.run (PmdRunnable.java:80)
20:14:27 at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
20:14:27 at java.util.concurrent.FutureTask.run (FutureTask.java:317)
20:14:27 at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
20:14:27 at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
20:14:27 at java.lang.Thread.run (Thread.java:1583)
Code Sample demonstrating the issue:
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
public class TransformationRecorder {
private Multimap<Integer, Integer> impTransforms = ImmutableMultimap.of();
public void recordTransformation() {
impTransforms = MultimapBuilder.hashKeys().hashSetValues(1).build();
}
}Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
Maven
Metadata
Metadata
Assignees
Labels
a:bugPMD crashes or fails to analyse a file.PMD crashes or fails to analyse a file.
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.