peichhorn / lombok-pg

Collection of lombok extensions
http://peichhorn.github.com/lombok-pg/
Other
326 stars 44 forks source link

Problem with EnumId #154

Open abdielnunes opened 6 years ago

abdielnunes commented 6 years ago

Guys,

I'm having a problem performing the build. Does anyone have any ideas?

@RequiredArgsConstructor public enum ProcessStatus {

PENDING(0),
PROCESSING(1),
FINISHED(2),
PENDING_RE_EXECUTION(3),
PROCESSING_ERROR(9);

@EnumId
@Getter
private final int code;

}

[ERROR] /C:/Plataform/projects/workspace-spring-dashboard/project-boot/src/main/java/br/com/foo/entity/enums/ProcessStatus.java:[20,12] constructor ProcessStatus in enum br.com.foo.core.entity.enums.ProcessStatus cannot be applied to given types; required: no arguments found: int reason: actual and formal argument lists differ in length

abdielnunes commented 6 years ago

I created a new project to perform the tests and I executed the command below.

java -jar lombok.jar delombok -p Status.java

C:\Plataform\projects\workspace-spring-dashboard\spring-lombok\src\main\java\br\com\poc\lombok\entity\enums\Status.java:3: error: cannot find sy mbol import lombok.EnumId; ^ symbol: class EnumId

It is recommended that the compiler be upgraded. // Generated by delombok at Thu Jul 27 10:10:31 BRT 2017 package br.com.poc.lombok.entity.enums;

import lombok.EnumId;

public enum Status { WAITING(0), READY(1), SKIPPED(-1), COMPLETED(5); @EnumId private final int code;

    @java.beans.ConstructorProperties({"code"})
    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    private Status(final int code) {
            this.code = code;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public int getCode() {
            return this.code;
    }

}