You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Cazacu Mihai (JIRA)" <ji...@apache.org> on 2017/05/14 15:43:04 UTC

[jira] [Commented] (GROOVY-7670) CLONE - dash in script filename

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

Cazacu Mihai commented on GROOVY-7670:
--------------------------------------

Is there any progress on this? It would be nice to have language agnostic file names.

> CLONE - dash in script filename
> -------------------------------
>
>                 Key: GROOVY-7670
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7670
>             Project: Groovy
>          Issue Type: Bug
>          Components: class generator
>    Affects Versions: 2.4.5
>         Environment: Oracle Java 8, Windows (although OS is not relevant IMHO)
>            Reporter: Christoph Grothaus
>            Priority: Minor
>         Attachments: fibonacci_numbers.groovy, fibonacci-numbers.groovy
>
>
> Cannot create script with dash ("-") in filename.
> Please try to run the two attached groovy scripts. The one with an underscore in the filename runs happily (don't wonder, it gives no output). The one with a dash in the filename gives this error: {noformat}$ groovy fibonacci-numbers.groovy
> Caught: java.lang.ClassFormatError: Illegal class name "fibonacci-numbers$fib" in class file fibonacci-numbers$fib
> java.lang.ClassFormatError: Illegal class name "fibonacci-numbers$fib" in class file fibonacci-numbers$fib
>         at fibonacci-numbers.run(fibonacci-numbers.groovy:5){noformat}
> It really took me some time to figure out that the dash was causing this. I would like to see Groovy allowing dashes in script filenames. If that should be impossible, at least the error message should cleary indicate that I have used an illegal character in the script filename.



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