mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 12:15:00 +00:00
NPE fix
This commit is contained in:
1 parent
1bfe6ee1a5
commit
f3fcdcf65c
1 file changed
+10
-6
@@ -30,17 +30,21 @@ public class TreeMirrorMaker extends TreeCopier<Void> {
|
||||
|
||||
@Override public <T extends JCTree> List<T> copy(List<T> originals) {
|
||||
List<T> copies = super.copy(originals);
|
||||
Iterator<T> it1 = originals.iterator();
|
||||
Iterator<T> it2 = copies.iterator();
|
||||
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
|
||||
if (originals != null) {
|
||||
Iterator<T> it1 = originals.iterator();
|
||||
Iterator<T> it2 = copies.iterator();
|
||||
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
|
||||
}
|
||||
return copies;
|
||||
}
|
||||
|
||||
@Override public <T extends JCTree> List<T> copy(List<T> originals, Void p) {
|
||||
List<T> copies = super.copy(originals, p);
|
||||
Iterator<T> it1 = originals.iterator();
|
||||
Iterator<T> it2 = copies.iterator();
|
||||
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
|
||||
if (originals != null) {
|
||||
Iterator<T> it1 = originals.iterator();
|
||||
Iterator<T> it2 = copies.iterator();
|
||||
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
|
||||
}
|
||||
return copies;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user