Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with EnumId #154

Open
abdielnunes opened this issue Jul 26, 2017 · 1 comment
Open

Problem with EnumId #154

abdielnunes opened this issue Jul 26, 2017 · 1 comment

Comments

@abdielnunes
Copy link

abdielnunes commented Jul 26, 2017

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
Copy link
Author

abdielnunes commented Jul 27, 2017

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;
    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant