Commit 2238de65 by Tom Tromey Committed by Tom Tromey

StringBuffer.java (toString): Don't mark buffer as shared.

	* java/lang/StringBuffer.java (toString): Don't mark buffer as
	shared.
	(insert(int,char[],int,int): New method.
	(delete): New method from Classpath.
	(deleteCharAt): Likewise.
	(substring): Likewise.
	(shared): No longer private.
	Added JavaDoc comments from Classpath.
	* java/lang/String.java (String(StringBuffer)): Ensure `buffer' is
	shared.

From-SVN: r33809
parent 4c3f1588
2000-05-09 Tom Tromey <tromey@cygnus.com>
* java/lang/StringBuffer.java (toString): Don't mark buffer as
shared.
(insert(int,char[],int,int): New method.
(delete): New method from Classpath.
(deleteCharAt): Likewise.
(substring): Likewise.
(shared): No longer private.
Added JavaDoc comments from Classpath.
* java/lang/String.java (String(StringBuffer)): Ensure `buffer' is
shared.
2000-05-07 Tom Tromey <tromey@cygnus.com>
* Makefile.in: Rebuilt.
......
......@@ -38,7 +38,11 @@ public final class String
public String (StringBuffer buffer)
{
init (buffer.value, 0, buffer.count, true);
synchronized (buffer)
{
buffer.shared = true;
init (buffer.value, 0, buffer.count, true);
}
}
public String (char[] data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment