summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/src/inspectionDescriptions/StringConstructor.html
blob: a8ea2df6e63c5cd5a2def7f2c494b6c7c8c20443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<body>
Reports any attempt to instantiate a new
<b>String</b> object by copying an existing string.
Constructing new <b>String</b> objects in this way
is rarely necessary, and may cause performance problems if done often enough.
<!-- tooltip end -->
<p>
Use the checkbox below to ignore <b>String</b>
constructor calls which have a <b>String.substring()</b>
call as parameter. A call to <b>substring()</b>
reuses the character array of the original string, which can cause a large
amount of garbage to stay in memory if the substring is small in relation to the
original <b>String</b>.
<p>
<small>Powered by InspectionGadgets</small>
</body>
</html>