Results for “java stringbuffer to string example problem code site:bugs.java.com error”
bugs.java.com
Bug ID: JDK-6219959 StringBuffer.toString () innefficient in ...
One might consider reintroducing sharing only between String and StringBuffer and not between String and StringBuilder to avoid the correctness problems described above, but because StringBuffer and StringBuilder share most of their implementations, this would result in a large amount of code duplication and make maintenance much more difficult.
bugs.java.com
JDK-6650179 : StringBuilder.toString () and StringBuffer ...
JDK-6650179 : StringBuilder.toString () and StringBuffer.toString () optimization
bugs.java.com
Bug ID: JDK-6304514 StringBuilder and StringBuffer need ...
These are some examples (not sure that they're all valid, but seem worth considering): a) The two constructors for String taking StringBuffer and StringBuilder respectively, could be collapsing into a single constructor taking a StringAssembler. b) There is a request to add a StringBuilder equivalent of StringWriter.
bugs.java.com
Bug ID: JDK-4524848 StringBuffer's setLength() Results in Unneeded...
This problem only occurs if a String constructor has been passed a StringBuffer object as a parameter (which causes the StringBuffer's "shared" flag to be set to true) *AND* the StringBuffer's length is later set to zero. The coding error is in the "StringBuffer.setLength()" method.
bugs.java.com
JDK-4834695 : RFE: StringBuffer and String.substring ...
This would enhance a lot of places where StringBuffers should be kept at the estimated initial storage size: because conversion of StringBuffer to String currently makes the buffer to shared state, the StringBuffer needs to be reallocated while it could stay allocated; the String.setLength () method will not create a new char [] array because ...
bugs.java.com
Bug ID: JDK-8218227 StringBuilder/StringBuffer constructor ...
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release. To download the current JDK release, click here.