From 3d3d49e94553354aa77d33cb462a1cc4731edcc4 Mon Sep 17 00:00:00 2001 From: ait Date: Tue, 24 Jun 2008 11:52:20 +0000 Subject: [PATCH] Revert of wrong fix for GROOVY-2138 git-svn-id: http://svn.codehaus.org/groovy/trunk/groovy/groovy-core@12847 a5544e8c-8a19-0410-ba12-f9af4593a198 --- .../org/codehaus/groovy/runtime/DefaultGroovyMethods.java | 11 ----------- src/test/groovy/lang/StringConcatTest.groovy | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 src/test/groovy/lang/StringConcatTest.groovy diff --git a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java index 3347862..6e24fa7 100644 --- a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java +++ b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java @@ -5604,17 +5604,6 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport { } /** - * Concat any object with String - * - * @param self an object - * @param str string to concat with - * @return result string - */ - public static String plus(Object self, CharSequence str) { - return self + str.toString(); - } - - /** * Appends a String to this StringBuffer. * * @param left a StringBuffer diff --git a/src/test/groovy/lang/StringConcatTest.groovy b/src/test/groovy/lang/StringConcatTest.groovy new file mode 100644 index 0000000..d7a1e5a --- /dev/null +++ b/src/test/groovy/lang/StringConcatTest.groovy @@ -0,0 +1,11 @@ +package groovy.lang + +class StringConcatTest extends GroovyTestCase{ + void testMe () { +// def x = new Object() +// assertEquals ("${x}239".toString(), x + "239") +// assertEquals ("239${x}777".toString(), "239" + x + 777) +// assertEquals ("${x}Builder${x}".toString(), x + new StringBuilder("Builder") + x) + } +} + -- 2.11.4.GIT