From 68c5b016f9a2663abc9cd4aeb0cc0034949469ca Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 6 Jun 2014 00:41:01 +0200 Subject: [i554] Another try to prevent NPEs on IBM J9 --- src/core/lombok/javac/apt/Processor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/lombok/javac/apt/Processor.java b/src/core/lombok/javac/apt/Processor.java index 3d234541..ce4d75ff 100644 --- a/src/core/lombok/javac/apt/Processor.java +++ b/src/core/lombok/javac/apt/Processor.java @@ -256,12 +256,16 @@ public class Processor extends AbstractProcessor { for (int i = priorityLevels.length - 1; i >= 0; i--) { Long curLevel = priorityLevels[i]; Long nextLevel = (i == priorityLevels.length - 1) ? null : priorityLevels[i + 1]; + List cusToAdvance = new ArrayList(); for (Map.Entry entry : roots.entrySet()) { if (curLevel.equals(entry.getValue())) { - entry.setValue(nextLevel); + cusToAdvance.add(entry.getKey()); newLevels.add(nextLevel); } } + for (JCCompilationUnit unit : cusToAdvance) { + roots.put(unit, nextLevel); + } } newLevels.remove(null); -- cgit