mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-11 12:19:00 +00:00
[fixes #2246] Add null check
This commit is contained in:
1 parent
94440a8bd7
commit
d34fdeb3b4
4 files changed
+26
-3
No files matched your search
@@ -660,9 +660,11 @@ public class EclipseHandlerUtil {
|
||||
|
||||
Annotation[][] b = new Annotation[a.length][];
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
b[i] = new Annotation[a[i].length];
|
||||
for (int j = 0 ; j < a[i].length; j++) {
|
||||
b[i][j] = copyAnnotation(a[i][j], a[i][j]);
|
||||
if (a[i] != null) {
|
||||
b[i] = new Annotation[a[i].length];
|
||||
for (int j = 0 ; j < a[i].length; j++) {
|
||||
b[i][j] = copyAnnotation(a[i][j], a[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,18 @@ import java.util.List;
|
||||
}
|
||||
class TypeUseAnnotations {
|
||||
List<@TA(x = 5) String> foo;
|
||||
List<TypeUseAnnotations.@TA(x = 5) Inner> bar;
|
||||
|
||||
class Inner {
|
||||
}
|
||||
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public List<@TA(x = 5) String> getFoo() {
|
||||
return this.foo;
|
||||
}
|
||||
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public List<TypeUseAnnotations.@TA(x = 5) Inner> getBar() {
|
||||
return this.bar;
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,20 @@ import java.util.List;
|
||||
int x();
|
||||
}
|
||||
class TypeUseAnnotations {
|
||||
class Inner {
|
||||
Inner() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@lombok.Getter List<@TA(x = 5) String> foo;
|
||||
@lombok.Getter List<TypeUseAnnotations.@TA(x = 5) Inner> bar;
|
||||
TypeUseAnnotations() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") List<@TA(x = 5) String> getFoo() {
|
||||
return this.foo;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") List<TypeUseAnnotations.@TA(x = 5) Inner> getBar() {
|
||||
return this.bar;
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,6 @@ import java.util.List;
|
||||
}
|
||||
class TypeUseAnnotations {
|
||||
@lombok.Getter List<@TA(x=5) String> foo;
|
||||
@lombok.Getter List<TypeUseAnnotations.@TA(x=5) Inner> bar;
|
||||
class Inner { }
|
||||
}
|
||||
Reference in new issue
Block a user