Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-414

Class names are not case sensitive on Mac OS X

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-beta-6
    • None
    • None
    • Mac OS X 10.3.2, java 1.4.2

    Description

      I cannot use a variable name that is the same as a class name, even if the case if different. For example, this will fail:

      snap = new Snap()

      with this error:

      org.codehaus.groovy.syntax.SyntaxException: Cannot use a class expression on the left hand side of an assignment.

      I believe this is because the default Mac OS file system supports mixed case filenames but file name searches are case insensitive. It appears that groovy searches the FS for a class that matches the token to determine if it is a class. But I think for Mac OS, even if it finds an FS match, it needs to do its own case sensitive comparison to determine if the token is indeed a class name.

      Attachments

        1. GroovyClassLoader.java.diff
          4 kB
          John Stump
        2. GroovyClassLoader.java.diff
          3 kB
          John Stump

        Activity

          People

            spullara Sam Pullara
            johnstump John Stump
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: