Skip to content

Commit

Permalink
projectlombok#3706 add null check to compilationUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
kvlohith1 committed Jul 21, 2024
1 parent eb4722c commit ff8ceb7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;

import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ast.ASTNode;
Expand Down Expand Up @@ -2838,6 +2833,8 @@ public static void setDocComment(CompilationUnitDeclaration cud, TypeDeclaration
if (doc == null) return;

ICompilationUnit compilationUnit = cud.compilationResult.compilationUnit;
if(compilationUnit == null)
return;
if (compilationUnit.getClass().equals(COMPILATION_UNIT)) {
try {
compilationUnit = (ICompilationUnit) Permit.invoke(COMPILATION_UNIT_ORIGINAL_FROM_CLONE, compilationUnit);
Expand Down

0 comments on commit ff8ceb7

Please sign in to comment.