mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 18:13:59 +07:00
This is necessary to support type annotations on array components properly. E.g. if the type is `@C int @A [] @B []`, then the outermost type is annotated via @A, its component via @B, and the deepest component is via @C (before this change, we assumed that the order is @B -> @A -> @C). This caused bugs when normalizing the mixed C-style/Java-style declaration that has annotations on any array component or when reading nullability from type in DFA (IDEA-245323) Now PSI is changed for multi-dimensional arrays: PsiTypeElement now has only one PsiTypeElement child for the deepest component type and all brackets are placed on the same level. GitOrigin-RevId: ac2e6eb2d4224e68a25270ccc2a71769bbb1afd3
17 lines
534 B
Java
17 lines
534 B
Java
import typeUse.*;
|
|
|
|
// IDEA-245323
|
|
class Test {
|
|
void test0(final Object @NotNull [] @Nullable [] values) {
|
|
for (final Object[] line : values) {
|
|
for (final Object item : <warning descr="Dereference of 'line' may produce 'NullPointerException'">line</warning>) {
|
|
}
|
|
}
|
|
}
|
|
void test1(final Object @Nullable[] @NotNull[] values) {
|
|
for (final Object[] line : <warning descr="Dereference of 'values' may produce 'NullPointerException'">values</warning>) {
|
|
for (final Object item : line) {
|
|
}
|
|
}
|
|
}
|
|
} |