Skip to content

Commit

Permalink
Assign an init value to 'fCollapsedTypes'variable to avoid NPE when i…
Browse files Browse the repository at this point in the history
…nvoking completion on DEBUG CONSOLE
  • Loading branch information
testforstephen committed Mar 5, 2024
1 parent 27a1a1e commit 1fe85a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package org.eclipse.jdt.ls.core.internal.contentassist;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.core.runtime.Assert;
Expand Down Expand Up @@ -52,7 +53,7 @@ public class CompletionProposalDescriptionProvider {
*/
private CompletionContext fContext;
private ICompilationUnit fUnit;
private Map<String, Integer> fCollapsedTypes;
private Map<String, Integer> fCollapsedTypes = new HashMap<>();

/**
* Creates a new label provider.
Expand Down

0 comments on commit 1fe85a6

Please sign in to comment.