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

Delombok option doesn't generate code for @Nonnull check. #950

Closed
Scythson opened this Issue Oct 21, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@Scythson

Scythson commented Oct 21, 2015

So, what I'm trying to do, is to generate null check code with delombok feature, but it doesn't work:

c:\lib>java -jar lombok.jar delombok -p LombokTest.java

package com.some.test;

import lombok.*;

import java.io.Serializable;

public class LombokTest implements Serializable {

        public String text;

        public LombokTest( @NonNull Object text) {
                this.text = text.toString();
        }

        public int setText( @ NonNull String anotherText) {
                this.text = anotherText;
                return anotherText.length();
        }
}

c:\lib>java -jar lombok.jar -version
v1.16.6 "Candid Duck"

c:\lib>java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

@rspilker

This comment has been minimized.

Show comment
Hide comment
@rspilker

rspilker Oct 26, 2015

Collaborator

I can reproduce the problem. Luckily, the compiler does generate the null-check.

Collaborator

rspilker commented Oct 26, 2015

I can reproduce the problem. Luckily, the compiler does generate the null-check.

@rspilker

This comment has been minimized.

Show comment
Hide comment
@rspilker

rspilker Oct 26, 2015

Collaborator

Hmm, delombok doesn't work at all. It no longer detects changes to the AST and therefore just copies the input.

Collaborator

rspilker commented Oct 26, 2015

Hmm, delombok doesn't work at all. It no longer detects changes to the AST and therefore just copies the input.

@Scythson

This comment has been minimized.

Show comment
Hide comment
@Scythson

Scythson Oct 27, 2015

Thank you! Looking forward to see it in the build.

Scythson commented Oct 27, 2015

Thank you! Looking forward to see it in the build.

@kloklo90

This comment has been minimized.

Show comment
Hide comment
@kloklo90

kloklo90 May 2, 2017

I have switched to delombok 1.16.16.0 and lombok 1.16.16 the combination does not get rid of the issue with lombok nonnull. Did anyone else fix the issue with lombok.nonnull

kloklo90 commented May 2, 2017

I have switched to delombok 1.16.16.0 and lombok 1.16.16 the combination does not get rid of the issue with lombok nonnull. Did anyone else fix the issue with lombok.nonnull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment