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 206142 - Inspect and Transform: provide a transform for single-character Strings
Summary: Inspect and Transform: provide a transform for single-character Strings
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 14:25 UTC by twolf2919
Modified: 2013-09-02 14:21 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 twolf2919 2011-12-08 14:25:21 UTC
It would be very useful to have Inspect & Transform provide a transformation for cases where the code appends single-character strings instead of using characters.  I.e.
     stringBuilder.append("1");

should be replaced by:
     stringBuilder.append('1');

PMD has a rule that finds these things: AppendCharacterWithChar, but, alas, PMD doesn't fix things for you :-(