apache / apache/netbeans

Throw exceptions on bad parameters or broken internal state rather than return null or neutral value.

Open
#6,113 0 comments 0 reactions 0 assignees View on GitHub
kind:bug LSP needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 18

### What happened

NBLS commands tend to return some neutral / empty value instead of throwing an exception when the arguments are bad, missing or malformed.This may hide incorrect client usage. It is better to return an exceptional CompletableFuture so the client does know. See comments in #6079 for example.

### How to reproduce

_No response_

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

any

### JDK

any

### Apache NetBeans packaging

Apache VSNetBeans for VSCode

### Anything else

_No response_

### Are you willing to submit a pull request?

Yes

Contributor guide

Open the contributing guide

Research direction

Start with the NBLS command implementations and the example discussed in issue #6079. Inventory commands that receive bad, missing, or malformed arguments or encounter broken internal state, then define coverage for exceptional CompletableFuture results; done means those cases no longer return neutral values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.