netbeans
netbeans copied to clipboard
Gradle build actions NPE and visually inaccurate state
Apache NetBeans version
Apache NetBeans 15
What happened
NPE and inconsistent visual state
How to reproduce
gradle projects are created with NewProject > JavaWithGradle > JavaClassLibrary
Get to this dialog with GradleProject > properties > Build > BuildActions
First note that although nothing is selected in the ConfiguredActions
list, both the Disable and Reset buttons are enabled. Note that when this first comes up is the only time the configuration details shows up without a ConfiguredActions selection. If you select an action, then deselect, CTRL click, you will see No Selected Action
. I like seeing the details area when it first comes up to get an idea of what you can do with an action. But if only came up when something was selected, then there would be no issue with the Reset button.
- When it first comes up, the Reset button is enabled. Click it and there is an NPE in the NB log.
The rest of this is about stuff that seems/looks wrong, but I'm not familiar enough with this dialog to be certain. For example, what does boldface mean in Configured Actions
list? Should some actions start in a disabled state or is there a reason that Restore doesn't restore?
- Boldface in
Configured Actions
list inconsistent- Open
Build Actions
dialog - In
Override in Configuration
combo selectContinuous Mode
- In
Configure Action
combo selectbuild
- In
Configure Action
combo selectdebug
- Observe,
debug
is in boldface - click OK to close dialog
- Re-open
Build Actions
dialog - In
Override in Configuration
combo selectContinuous Mode
- Observe that
debug
is not boldface
- Open
Starting with fresh project
- Disable button and related (first 4 steps same as previous)
- Open
Build Actions
dialog - In
Override in Configuration
combo selectContinuous Mode
- In
Configure Action
combo selectbuild
- In
Configure Action
combo selectdebug
- Select
build
,Disable
- Select
debug
,Disable
- Select
build
,Restore
- Select
debug
,Restore
- Observe,
debug
is not Restored - With
debug
still selected, clickReset
- Again, in
Configure Action
combo selectdebug
- Observe that debug is enabled.
- Again select
debug
, Disable - OK/close Dialog
- Re-open dialog
- In
Override in Configuration
combo selectContinuous Mode
- Select
debug
, clickReset
- Again, in
Configure Action
combo selectdebug
- Observe that
debug
is still disabled after reset 12 and 19 are inconsistent.
- Open
Following doesn't really belong in this report
- Start with fresh project
- Open subproject lib
- Right click subproject lib
- Select Delete
- Click
also delete source
- Click Yes
- Observe that the dialog doesn't go away.
- Observe takes exactly 1 minute for the dialog to go away
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux harmony 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1
JDK
openjdk version "11.0.2" 2019-01-15
Apache NetBeans packaging
Own source build
Anything else
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
Fix for the NPE in #4703 .
@lkishalmi , @sdedic Since I'm not sure what is proper behavior... Even the NPE fix could be handled differently by coming up with "nothing selected".
@mbien , can this be reopened? The "NPE" is fixed but the "visually inaccurate state" is pending; need some feedback on what is proper behavior. The opening comment outlines some inconsistencies in the dialog, and I'm not sure what it's supposed to do.
sure