Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@SuppressRestrictedWarnings did not need RUNTIME retention #60

Merged
merged 1 commit into from Sep 23, 2021

Conversation

jglick
Copy link
Member

@jglick jglick commented Sep 23, 2021

Seems to have been a contributing cause of a Guice error encountered by @schottsfired when an optional dependency was not present in the test classpath:

java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
        at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
        at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
        at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
        at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
        at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
        at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
        at java.lang.Class.createAnnotationData(Class.java:3521)
        at java.lang.Class.annotationData(Class.java:3510)
        at java.lang.Class.getAnnotation(Class.java:3415)
        at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
        at com.google.inject.internal.UntargettedBindingProcessor$1.visit(UntargettedBindingProcessor.java:51)
        at com.google.inject.internal.UntargettedBindingProcessor$1.visit(UntargettedBindingProcessor.java:35)
        at com.google.inject.internal.UntargettedBindingImpl.acceptTargetVisitor(UntargettedBindingImpl.java:41)
        at com.google.inject.internal.UntargettedBindingProcessor.visit(UntargettedBindingProcessor.java:35)
        at com.google.inject.internal.UntargettedBindingProcessor.visit(UntargettedBindingProcessor.java:27)
        at com.google.inject.internal.BindingImpl.acceptVisitor(BindingImpl.java:93)
        at com.google.inject.internal.AbstractProcessor.process(AbstractProcessor.java:56)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:187)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:281)
        at …

Note that neither the annotation nor the annotated member are shown in the stack trace; that seems similar to (but distinct from) an error better diagnosed in google/guice#1279.

Amends #16.

@jglick jglick added the bug label Sep 23, 2021
@jglick jglick merged commit bb04472 into jenkinsci:master Sep 23, 2021
@jglick jglick deleted the retention-policy branch September 23, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants