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 237299 - squid:UselessParenthesesCheck rule as hint
Summary: squid:UselessParenthesesCheck rule as hint
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 08:38 UTC by hmbrand
Modified: 2013-10-18 08:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hmbrand 2013-10-18 08:38:06 UTC
This rule would be a nice to have hint:
--8<---
Useless parentheses around expressions should be removed to prevent any misunderstanding 
 squid : UselessParenthesesCheck

 Useless parentheses can sometimes be misleading and so should be removed. 

 The following code snippet illustrates this rule: 
return 3;             // Compliant
return (x);           // Non-Compliant
return (x + 1);       // Non-Compliant
int x = (y / 2 + 1);  // Non-Compliant
int y = (4+X) * y;    // Compliant
-->8---

Lightbulb => "Remove useless parentheses"