[ 
https://issues.apache.org/jira/browse/GROOVY-8415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Avinash Kumar  updated GROOVY-8415:
-----------------------------------
    Environment:     (was: jdk1.8.0_151 , ant-1.10.1 & Groovy-2.413)
    Description: 1  (was: 1
down vote
favorite
I am using Groovy-2.4.13 and JDK1.8.

in Java file,I have written below enum code:
Batchjob.java

public enum Status {OK, Fail, Log}

and calling the getter as 
{code}
@Enumerated(EnumType.STRING)
    public Status getStatus(){
        return status;
    }
{code}
Under Groovy Code, I am using the enum code here like ,
BatchjobCPR.groovy
{code}
import com.wmdata.project.model.Systemadministration.Batchjob

Batchjob.Status status = null;
if (!failstate) {
    setStatus(Batchjob.Status.OK);
}
{code}
Problem:

Whenever I am trying to compile by using ant compile it is throwing an error

[groovyc] 
C:\Users\XXXXX\AppData\Local\Temp\groovy-generated-6090874347631320245-java-source\com\wmdata\Project\batchrunner\BatchCPRUpdateJob.java:23:
 error: package Batchjob does not exist [groovyc] public Batchjob.Status 
getStatus() { return (Batchjob.Status)null;}

I am surprise why it is only throwing error where it calling the 
getStatus(which is nothing but enum variable), rest other groovy files are 
compiled successfully except this.

Please suggest me how to fix this?)
    Component/s:     (was: Ant integration)
                     (was: groovy-jdk)

> getter method of enum is throwing en error and returning null in jdk1.8.0_151 
> during compiling with Groovy-2.4.13
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8415
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8415
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.13
>            Reporter: Avinash Kumar 
>              Labels: enum, groovy, jdk1_8
>             Fix For: 2.4.13
>
>
> 1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to