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 240079 - Invert ternary operation - plugin available
Summary: Invert ternary operation - plugin available
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P4 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 14:00 UTC by lforet
Modified: 2016-07-01 17:57 UTC (History)
1 user (show)

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 lforet 2014-01-07 14:00:01 UTC
Like "invert if" it will be cool to have invert for ternary operator. Indeed, I would like to be able to rewrite :

(a != null) ? a.toString() : ""  

like this : 

(a == null) ? "" : a.toString()

regards.
Comment 1 markiewb 2014-05-14 17:35:39 UTC
FYI: the plugin http://plugins.netbeans.org/plugin/47589/additional-hints version 1.2.0 provides the requested hint/quickfix

So set the prio to P4