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 252648

Summary: Offer hint to convert String.replace(String, String) to String.replace(char, char)
Product: java Reporter: Tomas Hurka <thurka>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tomas Hurka 2015-05-28 14:12:15 UTC
string.replace(“.”,”/“) is much slower than string.replace(‘.’,’/‘). This is because String.replace method with String parameters uses regexp internally and using regexp is a huge overkill for this usecase. It would be nice to have a hint to use replace(char, char) if the replace(String, String) method replaces just one character with another one.