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 - Offer hint to convert String.replace(String, String) to String.replace(char, char)
Summary: Offer hint to convert String.replace(String, String) to String.replace(char, ...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-28 14:12 UTC by Tomas Hurka
Modified: 2015-05-28 14:12 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 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.