apache / apache/netbeans

Alt enter hotkey duplicates error messages causing persistent red underlines

Open
#8,772 0 comments 0 reactions 0 assignees Claimed by @wolftxt View on GitHub
hints Java kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 28 latest daily build

### What happened

Using alt + enter while netbeans is still analyzing the source code (right after a change) causes the error message to duplicate. When that issue is fixed with alt + enter, because the message was duplicated, the error message remains and the line still has a red underline.
https://github.com/user-attachments/assets/41b70a41-e83d-41d8-8128-3a6c4838cd5c

### Language / Project Type / NetBeans Component

Works with any java project

### How to reproduce

Write this line without importing Map or HashMap. `Map hashMap = new HashMap();` Use alt + enter to import and quickly press alt + enter again, the error message for the second import will be duplicated. Also works with other bugs like a missing semicolon.

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

No / Don't know

### Operating System

macOS Sequioa 15.2

### JDK

24.0.1

### Apache NetBeans packaging

Own source build

### Anything else

The bug is present both in Netbeans 26 binary zip and in own source build.

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

Yes

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Reproduce in a Java project by triggering Alt+Enter twice during source analysis, then trace the error-message and red-underline handling in NetBeans; done means the duplicate diagnostic is removed and the underline clears after the import or syntax error is fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.