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.

Bug 240734 - Supress hints in guarded blocks
Summary: Supress hints in guarded blocks
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: All All
: P4 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2014-01-21 08:02 UTC by manikantannaren
Modified: 2016-07-10 17:07 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2014-01-21 08:02:13 UTC
[ JDK VERSION : 1.8 ]

 faced a situation while reviewing the tutorial over view of JDK8 support in

The Hint actions don't work within guarded block. 

1. Create a Java project using the Anagram sample
2. Scroll down to line 175
3. On the gutter click on the hint icon
4. Select either of the hints - Use Member reference or Use Lambda Expression

Expected Result
The code block should reflect the usage of the hint

Actual REsult
Comment 1 manikantannaren 2014-01-21 08:04:40 UTC
Changed product to Java 
Changed component to Hints & Annotations
Comment 2 Svata Dedic 2014-01-21 09:00:57 UTC
Guarded blocks cannot be modified by normal code hints, as they are produced by a code generator which would change them back at some point based on form changes.

However the generator should produce such code (or should be configurable in some ways) NOT to trigger severe hints.

What can be done here:
1/ file an ENH request to form editor to support lambdas/method refs for JDK8 development. 

2/ hints could be suppressed in guarded blocks; either hints, or their actions
Comment 3 Martin Balin 2016-07-07 07:16:27 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 4 markiewb 2016-07-10 17:07:36 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)