From 4599b2d082227fc468f3a85a0545e2507181ae3d Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Tue, 5 Mar 2024 20:20:58 +0800 Subject: [PATCH] Initialize 'fCollapsedTypes' in the constructor --- .../contentassist/CompletionProposalDescriptionProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/CompletionProposalDescriptionProvider.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/CompletionProposalDescriptionProvider.java index d0483d527e..4aeb863ae5 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/CompletionProposalDescriptionProvider.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/CompletionProposalDescriptionProvider.java @@ -53,7 +53,7 @@ public class CompletionProposalDescriptionProvider { */ private CompletionContext fContext; private ICompilationUnit fUnit; - private Map fCollapsedTypes = new HashMap<>(); + private Map fCollapsedTypes; /** * Creates a new label provider. @@ -70,11 +70,13 @@ public CompletionProposalDescriptionProvider(ICompilationUnit unit, CompletionCo super(); fContext = context; fUnit = unit; + fCollapsedTypes = new HashMap<>(); } public CompletionProposalDescriptionProvider(CompletionContext context) { super(); fContext = context; + fCollapsedTypes = new HashMap<>(); } /**