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

Compilation problem for java enums defined as groovy classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.5
    • 1.8.6, 2.0-beta-3
    • Ant integration
    • None

    Description

      Hi, I have following groovy class TransactionStatus.groovy with code:

      package com.webbfontaine.twm.accounting.epaylog.emess.model.response

      public enum TransactionStatus {
      OK, ERROR
      }

      and compilation of this class using groovy 1.8.4 was ok but after migrating to 1.8.5 I have following:

      groovy.compile:
      [mkdir] Created dir: /home/sargis/projects/twm3.git/modules/accounting/Server/classes
      [groovyc] Compiling 186 source files to /home/sargis/projects/twm3.git/modules/accounting/Server/classes
      [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      [groovyc] Compile error during compilation with javac.
      [groovyc] warning: [options] bootstrap class path not set in conjunction with -source 1.6
      [groovyc] /tmp/groovy-generated-3682106614822967278-java-source/com/webbfontaine/twm/accounting/epaylog/emess/model/response/TransactionStatus.java:10: error: modifier final not allowed here
      [groovyc] public final enum TransactionStatus
      [groovyc] ^
      [groovyc] Note: Some input files use or override a deprecated API.
      [groovyc] Note: Recompile with -Xlint:deprecation for details.
      [groovyc] Note: Some input files use unchecked or unsafe operations.
      [groovyc] Note: Recompile with -Xlint:unchecked for details.
      [groovyc] 1 error
      [groovyc] 1 warning
      [groovyc]
      [groovyc]
      [groovyc] 1 error

      I am using

      <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">

      </taskdef>

      to compile groovy codes of my project.

      Attachments

        Activity

          People

            melix Cédric Champeau
            armsargis Sargis Harutyunyan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: