Delombok makes "+=" in Assignments to "="; will lead to broken code #633

lombokissues opened this Issue Jul 14, 2015 · 6 comments


None yet

1 participant


Migrated from Google Code (issue 598)


👤 KrokodilSchnappi   🕗 Oct 23, 2013 at 13:05 UTC

What steps will reproduce the problem?

  1. write a Java class with lombok annotations and a method containing a '+=' assignment. In the attached tgz in File src/exp/ line 13 you can see the example
  2. run delombok on the source file

What is the expected output?

expected output is the 'delomboked' code at the end of the source file, the body of the method getCalculatedValue() should be unchanged

What do you see instead?

delombok makes the line
ret += 1;
ret = 1;

(in attached tgz it is the file src-delomboked/exp/ line 9)

What version of the product are you using? On what operating system?

  • lombok v1.1.12
  • Output of java -version:
    java version "1.7.0_25"
    OpenJDK Runtime Environment (fedora-
    OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
  • Operating System: Fedora 17, Kernel 3.9.10-100

👤 KrokodilSchnappi   🕗 Oct 23, 2013 at 13:05 UTC

🔗 lomboktry.tar.gz


👤 reinierz   🕗 Oct 27, 2013 at 21:36 UTC

Yup, dang. I thought we had a test for this; we broke this during the modifications to handle new code in javac8.

Well, we have tests for it now, and this issue has been fixed.

Edge release is here:

We'll probably release a new official version quite soon; this is a major issue that shouldn't be in a stable release.

@lombokissues lombokissues added this to the 1.12.4 milestone Jul 14, 2015

👤 r.spilker   🕗 Dec 11, 2013 at 18:22 UTC

Issue #649 has been merged into this issue.


👤 reinierz   🕗 Jan 15, 2014 at 21:26 UTC

This fix is now part of the latest official release. 1.12.4 was just pushed for download and to maven central.


End of migration

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