-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get StringBuilder capacity again after decompress
StringBuilder's capicity field is updated after a decompress() call is made. StringBuilder methods that store the capacity in a local variable before a call to decompress() should update this stored value again after the call. This applies only to StringBuilder methods that use the stored capacity value after a decompress() call. As an example, if this value is not updated again after decompress(), the old value will be used as a check on whether or not to run ensureCapacityImpl(), leading to additional array copies. decompress() now returns the new capacity, for which the sharedBit need not be masked off since decompress() creates a new array. Signed-off-by: Mansoor Saqib <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters