This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If a hint is do be used in Inspect&Transform, the fixes (and especially the "primary" Fix) it provides must fulfil a number of constraints: 1. must be JavaFix-es 2. must not have any side-effects 3. must be repeatable The proposal is to partially enforce these constraints in tests, while a Fix is being applied. In particular, unless the hint is marked as QUERY, NO_BULK or it is an action, it is: -checked to be JavaFix -applies the fix twice, and checks the resulting ModificationResults are equivalent This is a behaviourally incompatible change - so far these constraints were not enforced by the tests. Currently, there is no way to suppress these specific test failures, either the fix must be fixed, or the hint marked as QUERY or NO_BULK. But a way to suppress the failure can be added if a compelling reason for suppression is found.
Created attachment 132445 [details] Proposed change.
Please review this behaviourally incompatible change to the hint test API. Thanks.
Unless there are objections, I'll integrate tomorrow.
Integrated into 'main-golden', will be available in build *201303232300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b55ff1661fd9 User: Jan Lahoda <jlahoda@netbeans.org> Log: #227271: partial enforcement of Java hints constraints for Inspect&Transform