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.
Summary: | wrong "UnusedAssignment" hint | ||
---|---|---|---|
Product: | java | Reporter: | vaxquis |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 249320 |
Description
vaxquis
2015-07-03 17:05:24 UTC
Note that IMO the main bug is not the fact that there ain't a warning with respect to constant comparisons nor the unused initalizer as the result (although I guess it should/could probably raise both "unused assignment" in intializer and "constant-result comparison" on the comparison itself), since that's quite an expectation from a static parser. OTOH, misleading warning is the real problem here. It took me about an hour to triple-check my code if the op is indeed used despite the warning. tl;dr Lack of warnings is not good, but I reckon a warning on completely good code is even worse. reproducible Fixed in the experimental impl; wait for the umbrella issue to close. |