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

Summary: Inspect and Transform: provide a transform for single-character Strings
Product: java Reporter: twolf2919 <twolf2919>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

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 :-(