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: | .isEmpty() should be suggested for .equalsIgnoreCase("") | ||
---|---|---|---|
Product: | java | Reporter: | davidje13 |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.0.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
davidje13
2014-10-11 13:42:31 UTC
You can create your own hint for this. Here is guide how to create and run your own hint with transformation: http://services.netbeans.org/synergy/client/app/#/case/2637/suite/1175/v/1 Here is code of the hint: $1.equalsIgnoreCase("") :: $1 instanceof java.lang.String => $1.equals("") ;; There's already a hint to convert equals("") to isEmpty or size() == 0 (for acient JREs) IMHO Implemented as jet-main#24c71c3cf09b Integrated into 'main-silver', will be available in build *201504230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/24c71c3cf09b User: Svata Dedic <sdedic@netbeans.org> Log: #247872: extended String.equals hint to cover equalsIgnoreCase |