3 ms·
StringBuffer doesn't actually give you any useful safety guarantees. If your program has threading bugs, a mangled string builder is probably the least of the p
by mcguire 10y ago
StringBuffer doesn't actually give you any useful safety guarantees. If your program has threading bugs, a mangled string builder is probably the least of the problems.
Thread safety isn't something you build up from tread safe components. It has to be designed in from the top.
Further, almost all string builder uses are trivially thread safe.