Hint : Value of increment expression is used
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 28
### What happened
The same hint "Value of increment expression is used" is provided whether the expression is `++iD` or `iD++`
I would expect the `iD++` hint to display something like "Value is used, then expression incremented."
The `++iD` hint could read "Value of incremented expression is used"
### Language / Project Type / NetBeans Component
Java Editor Hints
### How to reproduce
With a Java class open, Tools > Options > Options Window, Editor Tab, Hints Tab
Language : Java
Assignment Issues : Check Value of increment/decrement expression used
```
private int a = 0;
private final int b = a++;
private final int c = ++a;
```
In the source line number column yellow hint warning, the increment tooltip is displayed for both increment and decrement.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Win 11
### JDK
openjdk version 21.0.9
### Apache NetBeans packaging
Community provided installer
### Anything else
Thankyou all for your time contributing to Netbeans !
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Reproduce the warning in the Java Editor Hints settings using the provided `a++` and `++a` example. Locate the Assignment Issues hint implementation and any related tests, then verify that the two tooltips distinguish the order of value use and incrementing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100