Skip to content

Commit

Permalink
GROOVY-2987: Slow leftShift GDK methods
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.codehaus.org/groovy/branches/GROOVY_1_7_X@20509 a5544e8c-8a19-0410-ba12-f9af4593a198
  • Loading branch information
glaforge committed Jul 22, 2010
1 parent 1c0f069 commit fde63ec
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -94,8 +94,10 @@ public static int size(StringBuilder builder) {
* @return the StringBuilder on which this operation was invoked
*/
public static StringBuilder leftShift(StringBuilder self, Object value) {
self.append(value);
return self;
if (value instanceof CharSequence)
return self.append((CharSequence)value);
else
return self.append(value);
}

/**
Expand Down

0 comments on commit fde63ec

Please sign in to comment.