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 225983

Summary: Suggestion : add clarifying parenthesis
Product: java Reporter: lforet <lforet>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: markiewb
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description lforet 2013-02-11 13:29:34 UTC
In some expression you can need to have extra parenthesis to clarify operands.

Example :

if (operandAquitecomplicated && otherOperand) {}
-add clarifying parenthesis-> 
if ((operandAquitecomplicated) && (otherOperand)) {}
Comment 1 markiewb 2013-02-11 15:58:03 UTC
You could use a custom inspection. For example:

<!description="Add extra parenthesis">
$operandAquitecomplicated && $otherOperand
=>
($operandAquitecomplicated) && ($otherOperand)
;;