Status Update
Comments
sh...@gmail.com <sh...@gmail.com> #2
ak...@google.com <ak...@google.com>
js...@google.com <js...@google.com> #3
Likely from this line:
val attributes = parameters.attributes
...
val begin = attributes.first().startOffset
In addition to that one, there are a couple more first()
and last()
calls that are vulnerable to this kind of exception if, for some reasons, attributes is empty.
va...@gmail.com <va...@gmail.com> #4
Still an issue with 31.1.1, when are you planning to fix this?
tn...@google.com <tn...@google.com> #5
Here's the test file which triggers this bug:
package foo;
@Module @SuppressWarnings public interface MyModule {
The problem here is the @SuppressWarnings
annotation; lint assumes it has arguments (which it should; the above code is invalid). Of course, lint should be working on the fly in the editor on broken source too, so I've uploaded a fix for this (ag/24790474), but I'm guessing the above wasn't intentional for the test case.
an...@google.com <an...@google.com> #7
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 5
- Android Gradle Plugin 8.3.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Full stacktrace:
Public failing test: AnnotationOrderDetectorTest#suppressWarningsBeforeModule inhttps://github.com/vanniktech/lint-rules/pull/424