looking for some solutions? You are welcome.

SOLVED: Eclipse - Show @SuppressWarnings(value={"all"}) when lombok's Data and Constructor added

user7294900:

I have a class with lombok's @Data and @AllArgsConstructor(access = AccessLevel.PUBLIC):

@Data
@AllArgsConstructor(access = AccessLevel.PUBLIC)
public class ResponseVO implements Serializable {
    private static final long serialVersionUID = 3461582576096529916L;
    @JacksonXmlProperty(localName = "amount", isAttribute = true)
    String amount;
 }

When I'm using the constructor

new ResponseVO("22222");

I'm getting a warning inside tooltip when hovering over constructor method:

ResponseVO.ResponseVO(String amount)
@SuppressWarnings(value={"all"}) 

Why this warning added ? without @Data it disappears

Class decompile without any warnings:

public class ResponseVO implements Serializable {
    private static final long serialVersionUID = 3461582576096529916L;
    @JacksonXmlProperty(localName = "amount", isAttribute = true)
    String amount;

    public String getAmount() {
        return this.amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ResponseVO)) {
            return false;
        } else {
            ResponseVO other = (ResponseVO) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                String this$amount = this.getAmount();
                String other$amount = other.getAmount();
                if (this$amount == null) {
                    if (other$amount != null) {
                        return false;
                    }
                } else if (!this$amount.equals(other$amount)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof ResponseVO;
    }

    public int hashCode() {
        boolean PRIME = true;
        byte result = 1;
        String $amount = this.getAmount();
        int result1 = result * 59 + ($amount == null ? 43 : $amount.hashCode());
        return result1;
    }

    public String toString() {
        return "ResponseVO(amount=" + this.getAmount() + ")";
    }

    public ResponseVO(String amount) {
        this.amount = amount;
    }
}



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent