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

Unhandled IndexOutOfBoundsException thrown on MemberName rule, v2.20.0 #3979

Closed
mateuszrzeszutek opened this issue Jun 19, 2023 · 2 comments
Closed

Comments

@mateuszrzeszutek
Copy link

Hey,

We just upgraded errorprone to v2.20.0 and found out that it fails with an uncaught exception:

/Users/runner/work/opentelemetry-java/opentelemetry-java/api/all/src/main/java/io/opentelemetry/api/common/ArrayBackedAttributesBuilder.java:57: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
    attributes.forEach((key, value) -> put((AttributeKey) key, value));
                        ^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:
  
     error-prone version: 2.20.0
     BugPattern: MemberName
     Stack Trace:
     java.lang.IndexOutOfBoundsException: -1
  	at jdk.compiler/com.sun.tools.javac.util.List.get(List.java:482)
  	at com.google.errorprone.bugpatterns.MemberName.matchVariable(MemberName.java:156)
  	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:884)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:150)
...

See our GHA build: https://github.com/open-telemetry/opentelemetry-java/actions/runs/5307689259/jobs/9606448765?pr=5548
Dependabot PR: open-telemetry/opentelemetry-java#5548
And the line in question: https://github.com/open-telemetry/opentelemetry-java/blob/8f1a7b1c95e8d4a6591be7b48e54fe89da4f386b/api/all/src/main/java/io/opentelemetry/api/common/ArrayBackedAttributesBuilder.java#L57

@Stephan202
Copy link
Contributor

Hey @mateuszrzeszutek! I filed #3976 for this. :)

@mateuszrzeszutek
Copy link
Author

Thanks for letting me know!
Closing as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants