[jira] [Commented] (GROOVY-6792) ClassFormatError if a method has dots within its name

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Commented] (GROOVY-6792) ClassFormatError if a method has dots within its name

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/GROOVY-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924055#comment-15924055 ]

Paul King commented on GROOVY-6792:
-----------------------------------

This was found to break existing tests which included some of those special characters in the test names. My preliminary assessment is as follows:
Spock auto removes such names, so it isn't applicable to this discussion but non-spock tests could have those symbols when run using the gradle test runner - but not directly with groovy/groovyConsole. When I get time I'll do a more thorough assessment but for now the extra naming check is only turned on using a system property: groovy.compiler.strictNames. This system property is experimental and currently defaults to false (off = status quo). A future version of Groovy may change this system property to default to true or may re-enable the extra check all the time if some other workaround is found.

> ClassFormatError if a method has dots within its name
> -----------------------------------------------------
>
>                 Key: GROOVY-6792
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6792
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.2.1, 2.4.0-rc-1
>            Reporter: Maxim Medvedev
>            Assignee: Paul King
>             Fix For: 2.4.10
>
>
> I've got a ClassFormatError trying to run something like this:
> {code}
> class ATest extends TestCase {
>   void 'test methods with dots within its name.dot'() {}
> }
> {code}
> Original source is https://github.com/JetBrains/intellij-community/blob/master/java/java-tests/testSrc/com/intellij/refactoring/RenameSuggestionsTest.groovy
> Currently, the code at the above link works because all dots are replaced with underscores.
> Reproduced on Win 8 with Java 1.8 and Groovy 2.2.1. Can't reproduce on Mac with any Java.
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Loading...