Skip to content

Commit 6e4750f

Browse files
committed
fix(deps): bump com.vegardit.no-npe:no-npe-eea-all from 1.3.3 to 1.3.4
1 parent baaa039 commit 6e4750f

10 files changed

Lines changed: 21 additions & 23 deletions

File tree

org.eclipse.lsp4e.jdt/src/org/eclipse/lsp4e/jdt/LSJavaCompletionProposalComputer.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@
1111
*******************************************************************************/
1212
package org.eclipse.lsp4e.jdt;
1313

14-
import java.util.Collections;
1514
import java.util.List;
1615
import java.util.concurrent.CompletableFuture;
1716
import java.util.concurrent.ExecutionException;
1817
import java.util.concurrent.TimeUnit;
1918
import java.util.concurrent.TimeoutException;
2019

2120
import org.eclipse.core.runtime.IProgressMonitor;
22-
import org.eclipse.jdt.annotation.NonNullByDefault;
2321
import org.eclipse.jdt.annotation.Nullable;
2422
import org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext;
2523
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer;
@@ -44,23 +42,25 @@ public void sessionStarted() {
4442
}
4543

4644
@Override
47-
@NonNullByDefault({})
4845
public List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context,
4946
IProgressMonitor monitor) {
47+
final var viewer = context.getViewer();
48+
if(viewer == null)
49+
return List.of();
5050
CompletableFuture<ICompletionProposal[]> future = CompletableFuture.supplyAsync(() ->
51-
lsContentAssistProcessor.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));
51+
lsContentAssistProcessor.computeCompletionProposals(viewer, context.getInvocationOffset()));
5252

5353
try {
5454
return List.of(asJavaProposals(future));
5555
} catch (ExecutionException | TimeoutException e) {
5656
LanguageServerPlugin.logError(e);
5757
javaCompletionSpecificErrorMessage = createErrorMessage(e);
58-
return Collections.emptyList();
58+
return List.of();
5959
} catch (InterruptedException e) {
6060
LanguageServerPlugin.logError(e);
6161
javaCompletionSpecificErrorMessage = createErrorMessage(e);
6262
Thread.currentThread().interrupt();
63-
return Collections.emptyList();
63+
return List.of();
6464
}
6565
}
6666

@@ -82,7 +82,6 @@ private ICompletionProposal[] asJavaProposals(CompletableFuture<ICompletionPropo
8282
ICompletionProposal[] originalProposals = future.get(TIMEOUT_LENGTH, TIMEOUT_UNIT);
8383

8484
final var javaProposals = new ICompletionProposal[originalProposals.length];
85-
8685
for (int i = 0; i < originalProposals.length; i++) {
8786
if (originalProposals[i] instanceof ICompletionProposalExtension2) {
8887
javaProposals[i] = new LSJavaProposalExtension2(originalProposals[i]);
@@ -92,15 +91,16 @@ private ICompletionProposal[] asJavaProposals(CompletableFuture<ICompletionPropo
9291
javaProposals[i] = new LSJavaProposal(originalProposals[i]);
9392
}
9493
}
95-
9694
return javaProposals;
9795
}
9896

9997
@Override
100-
@NonNullByDefault({})
10198
public List<IContextInformation> computeContextInformation(ContentAssistInvocationContext context,
10299
IProgressMonitor monitor) {
103-
IContextInformation[] contextInformation = lsContentAssistProcessor.computeContextInformation(context.getViewer(), context.getInvocationOffset());
100+
final var viewer = context.getViewer();
101+
if(viewer == null)
102+
return List.of();
103+
IContextInformation[] contextInformation = lsContentAssistProcessor.computeContextInformation(viewer, context.getInvocationOffset());
104104
return contextInformation == null ? List.of() : List.of(contextInformation);
105105
}
106106

org.eclipse.lsp4e.jdt/src/org/eclipse/lsp4e/jdt/LspJavaQuickAssistProcessor.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
package org.eclipse.lsp4e.jdt;
1313

1414
import org.eclipse.core.runtime.CoreException;
15-
import org.eclipse.jdt.annotation.NonNullByDefault;
1615
import org.eclipse.jdt.annotation.Nullable;
1716
import org.eclipse.jdt.ui.text.java.IInvocationContext;
1817
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
@@ -53,13 +52,13 @@ public int getLength() {
5352
}
5453

5554
@Override
56-
public boolean hasAssists(@NonNullByDefault({}) IInvocationContext context) throws CoreException {
55+
public boolean hasAssists(final IInvocationContext context) throws CoreException {
5756
return this.canAssist(getContext(context));
5857
}
5958

6059
@Override
61-
public IJavaCompletionProposal @Nullable [] getAssists(@NonNullByDefault({}) IInvocationContext context,
62-
@NonNullByDefault({}) IProblemLocation[] locations) throws CoreException {
60+
public IJavaCompletionProposal @Nullable [] getAssists(final IInvocationContext context,
61+
final IProblemLocation[] locations) throws CoreException {
6362

6463
ICompletionProposal[] proposals = computeQuickAssistProposals(getContext(context));
6564
if (proposals == null)

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/codeactions/LSPCodeActionsMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private void scheduleMenuUpdate(final Menu menu, final MenuItem placeHolder, fin
109109
final @Nullable List<@Nullable Either<Command, CodeAction>> codeActions) {
110110
final var job = new UIJob(menu.getDisplay(), Messages.updateCodeActions_menu) {
111111
@Override
112-
public IStatus runInUIThread(@Nullable IProgressMonitor monitor) {
112+
public IStatus runInUIThread(IProgressMonitor monitor) {
113113
if (ex != null) {
114114
final var item = new MenuItem(menu, SWT.NONE, index);
115115
item.setText(String.valueOf(ex.getMessage()));

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public LSContentAssistProcessor(boolean errorAsCompletionItem, boolean incomplet
109109
private final Comparator<LSCompletionProposal> proposalComparator = new LSCompletionProposalComparator();
110110

111111
@Override
112-
public ICompletionProposal @Nullable [] computeCompletionProposals(ITextViewer viewer, int offset) {
112+
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
113113
IDocument document = viewer.getDocument();
114114
if (document == null) {
115115
return NO_COMPLETION_PROPOSALS;

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/highlight/HighlightReconcilingStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ private String kindToAnnotationType(@Nullable DocumentHighlightKind kind) {
308308
@Override
309309
public void preferenceChange(PreferenceChangeEvent event) {
310310
if (event.getKey().equals(TOGGLE_HIGHLIGHT_PREFERENCE)) {
311-
this.enabled = Boolean.parseBoolean(event.getNewValue().toString());
311+
this.enabled = Boolean.parseBoolean(String.valueOf(event.getNewValue()));
312312
if (enabled) {
313313
initialReconcile();
314314
} else {

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/linkedediting/LSPLinkedEditingBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private void cancel() {
9090
@Override
9191
public void preferenceChange(PreferenceChangeEvent event) {
9292
if (event.getKey().equals(LINKED_EDITING_PREFERENCE)) {
93-
this.fEnabled = Boolean.parseBoolean(event.getNewValue().toString());
93+
this.fEnabled = Boolean.parseBoolean(String.valueOf(event.getNewValue()));
9494
}
9595
}
9696
}

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/typeHierarchy/TypeHierarchyDialog.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
package org.eclipse.lsp4e.operations.typeHierarchy;
1010

1111

12-
import org.eclipse.jdt.annotation.Nullable;
1312
import org.eclipse.jface.dialogs.PopupDialog;
1413
import org.eclipse.jface.text.IDocument;
1514
import org.eclipse.jface.text.ITextSelection;
@@ -58,7 +57,7 @@ public TypeHierarchyDialog(Shell parentShell, ITextSelection textSelection, IDoc
5857
protected Control createDialogArea(Composite parent) {
5958
final var filteredTree = new FilteredTree(parent, SWT.BORDER, new PatternFilter(), true, false) {
6059
@Override
61-
protected Composite createFilterControls(@Nullable Composite parent) {
60+
protected Composite createFilterControls(Composite parent) {
6261
final var composite = new Composite(NullSafetyHelper.castNonNull(parent), SWT.NONE);
6362
final var layout = new GridLayout(2, false);
6463
layout.horizontalSpacing=0;

org.eclipse.lsp4e/src/org/eclipse/lsp4e/outline/SymbolsLabelProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public void init(final ICommonContentExtensionSite aConfig) {
359359
@Override
360360
public void preferenceChange(PreferenceChangeEvent event) {
361361
if (event.getKey().equals(CNFOutlinePage.SHOW_KIND_PREFERENCE)) {
362-
this.showKind = Boolean.parseBoolean(event.getNewValue().toString());
362+
this.showKind = Boolean.parseBoolean(String.valueOf(event.getNewValue()));
363363
for (Object listener : this.getListeners()) {
364364
if (listener instanceof ILabelProviderListener labelProviderListener) {
365365
labelProviderListener.labelProviderChanged(new LabelProviderChangedEvent(this));

org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/LanguageServersView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private void createColumn(String name, int width, ColumnLabelProvider labelProvi
121121
final var columnIndex = columnLabelProviders.size();
122122
tableColumn.addSelectionListener(new SelectionAdapter() {
123123
@Override
124-
public void widgetSelected(@Nullable final SelectionEvent e) {
124+
public void widgetSelected(final SelectionEvent e) {
125125
if (columnIndex == 0) // ignore the column with buttons
126126
return;
127127
if (tableSortColumn == columnIndex) {

target-platforms/target-platform-latest/target-platform-latest.target

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<!-- External Eclipse null Annotations, see https://github.com/vegardit/no-npe -->
3333
<groupId>com.vegardit.no-npe</groupId>
3434
<artifactId>no-npe-eea-all</artifactId>
35-
<version>1.3.3</version>
35+
<version>1.3.4</version>
3636
<type>jar</type>
3737
</dependency>
3838
</dependencies>

0 commit comments

Comments
 (0)