Bug 128020 - [clean up][J2SE50] convert StringBuffer usage to StringBuilder
Summary: [clean up][J2SE50] convert StringBuffer usage to StringBuilder
Status: CLOSED DUPLICATE of bug 572261
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 328354 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-15 08:45 EST by Benno Baumgartner CLA
Modified: 2021-07-02 09:48 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2006-02-15 08:45:33 EST
Write a clean up to convert StringBuffer usage to StringBuilder
Comment 1 Adam Kiezun CLA 2006-02-15 09:42:30 EST
for real, you'd need to do analysis to see if the buffer can escape the current thread. if yes, don't convert - you're risking race conditions (StringBuilder is unsynchronized).

(BTW, a similar refactoring would convert Vectors to ArrayLists - a similar concurrency problem arises)

An easy approximation is to check if the buffer can live longer than the current method. Most don't.
Comment 2 Benno Baumgartner CLA 2006-03-27 09:22:57 EST
Sorry, has to wait post 3.2
Comment 3 Aaron Digulla CLA 2007-12-18 04:50:58 EST
This is fixed in 3.4M4, isn't it?
Comment 4 Aaron Digulla CLA 2007-12-18 04:56:50 EST
Oops, sorry, I misunderstood the description. Bug 36350 is something else.
Comment 5 Dani Megert CLA 2010-10-22 03:10:26 EDT
*** Bug 328354 has been marked as a duplicate of this bug. ***
Comment 6 Jörg Kubitz CLA 2021-07-01 07:53:24 EDT
duplicated/implemented by Bug 572261 please close this
Comment 7 Noopur Gupta CLA 2021-07-02 09:48:04 EDT

*** This bug has been marked as a duplicate of bug 572261 ***