Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

vm_str: StringBuilder: Replace append(StringBuilder) with

append(StringBuffer sBuf); add 'synchronized' for sBuf
  • Loading branch information...
commit 336b6e1e1998790b0f27b56a10e19efc971101a3 1 parent 46bd110
@ivmai authored
View
2  goclsp/vm_str/java/lang/StringBuffer.java
@@ -51,7 +51,9 @@
{
// StringBuilder class: replace all "StringBuffer" with "StringBuilder"
+ // except for append(StringBuffer).
// StringBuilder class: remove all "synchronized" for StringBuilder
+ // except for that in append(StringBuffer).
// StringBuilder class: serialVersionUID is 4383685877147921099L
private static final long serialVersionUID = 3388685877147921107L;
View
4 goclsp/vm_str/java/lang/StringBuilder.java
@@ -264,12 +264,12 @@ else if (this.bytes != null &&
return this;
}
- public StringBuilder append(StringBuilder sBuf)
+ public StringBuilder append(StringBuffer sBuf)
{
if (sBuf == null)
return append("null");
int count = this.count;
- // (sBuf)
+ synchronized (sBuf)
{
int len = sBuf.length();
ensureCapacityInner(count + len, len > 0 &&
Please sign in to comment.
Something went wrong with that request. Please try again.