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

Groovy compiler on Google App Engine thinks it is facing Java 1.4 (and therefore annotations don't work)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.4, 1.7-beta-1
    • 1.6.5, 1.7-beta-2
    • Compiler
    • None

    Description

      Annotations are not present in classes compiled by the Groovy compiler running on App Engine. This is because the Java version check in VMPluginFactory doesn't work on App Engine, because ClassLoader.getSystemClassLoader() returns null there. Therefore I propose to change ClassLoader.getSystemClassLoader().loadClass(JDK5_CLASSNAME_CHECK) to VMPluginFactory.class.getClassLoader().loadClass(JDK5_CLASSNAME_CHECK). The new check is equally safe and also works on App Engine. If there are no objections, I will commit this change.
      Speaking of version checks, it might be a good idea to introduce (or even copy) something like Spring's JdkVersion class into the Groovy codebase. The Spring folks know very well how to handle such stuff.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            pniederw Peter Niederwieser
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment