-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
Philippe Marschall opened SPR-11042 and commented
Overview
NamedParameterUtils.substituteNamedParameters()
uses the following pattern:
stringBuilder.append(str.substring(start, end));
This wasn’t such an issue in HotSpot up to Java 7 Update 6, because even though it would allocate an unnecessary String
, it would not allocate a new char[]
. This all changed with 7u6 when String#substring
started allocating a new char[]
(it always did on J9).
Proposed Solution
Luckily this can easily be solved with the following pattern:
stringBuilder.append(str, start, end);
Affects: 3.2.4
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement