jtanistra / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

method names with [] / produce Illegal method name. Documentation? #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? If possible, provide source code and
stack trace.
given: "I'm working with spock in grails 1.3.7 through the latest plugin/spock 
version."
   def app = makeGrailsApp()
   app.installSpockPlugin()
when: "I create a method sentence string with crazy characters"
   app.addSpecAndMethod("Whatever", "test creating casualty limits from a valid string [occurance/aggregate/product]")

then: "I get an an exception"
Tests PASSED - view reports in target\test-reports
Error executing script TestApp: Illegal method name "test creating casualty limi
ts from a valid string [occurance/aggregate/product]" in class ...

java.lang.ClassFormatError: Illegal method name "test creating casualty limits f
rom a valid string [occurance/aggregate/product]" in class...
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java_lang_ClassLoader$loadClass.call(Unknown Source)
        at grails.plugin.spock.test.GrailsSpecTestType$_doPrepare_closure1.doCal

Original issue reported on code.google.com by Visionar...@gmail.com on 9 Nov 2011 at 7:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What's the name of the spec class?  Does it end in "Spec" or "Specification"?

Original comment by pnied...@gmail.com on 10 Nov 2011 at 4:43

GoogleCodeExporter commented 8 years ago
Didn't get any feedback. Assuming this is fixed, especially after our recent 
decision to completely remove original method declarations from byte code.

Original comment by pnied...@gmail.com on 17 Feb 2012 at 3:02