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

@UtilityClass makes statically initialized fields null #839

Closed
lombokissues opened this Issue Jul 14, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 804)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 tterrag1098   🕗 Apr 09, 2015 at 16:17 UTC

What steps will reproduce the problem?

  1. Create a class with @ UtilityClass on it
  2. Make a field that is predefined, e.g. private Random rand = new Random();
  3. The field will be made static but have no assignment

What is the expected output? What do you see instead?
I expect the field to maintain its assignment instead of becoming null

What version of the product are you using? On what operating system?
Lombok v1.16.2
Eclipse Luna 4.4.2
Windows 7 running java 7

Please provide any additional information below.
This issue is also reported on the google groups: https://groups.google.com/forum/﹟!topic/project-lombok/2N7choSgru8

Collaborator

lombokissues commented Jul 14, 2015

👤 tterrag1098   🕗 Apr 09, 2015 at 16:17 UTC

What steps will reproduce the problem?

  1. Create a class with @ UtilityClass on it
  2. Make a field that is predefined, e.g. private Random rand = new Random();
  3. The field will be made static but have no assignment

What is the expected output? What do you see instead?
I expect the field to maintain its assignment instead of becoming null

What version of the product are you using? On what operating system?
Lombok v1.16.2
Eclipse Luna 4.4.2
Windows 7 running java 7

Please provide any additional information below.
This issue is also reported on the google groups: https://groups.google.com/forum/﹟!topic/project-lombok/2N7choSgru8

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Apr 14, 2015 at 19:45 UTC

Good catch! Fixed and will be out real soon (couple hours, we're going to push out a release right after this).

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Apr 14, 2015 at 19:45 UTC

Good catch! Fixed and will be out real soon (couple hours, we're going to push out a release right after this).

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 tterrag1098   🕗 Apr 14, 2015 at 22:43 UTC

Awesome! Thanks for the quick fix.

Collaborator

lombokissues commented Jul 14, 2015

👤 tterrag1098   🕗 Apr 14, 2015 at 22:43 UTC

Awesome! Thanks for the quick fix.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

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