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

[BUG] Inconsistent results using concatenated string literals #3622

Open
Rawi01 opened this issue Mar 12, 2024 · 0 comments
Open

[BUG] Inconsistent results using concatenated string literals #3622

Rawi01 opened this issue Mar 12, 2024 · 0 comments

Comments

@Rawi01
Copy link
Collaborator

Rawi01 commented Mar 12, 2024

Describe the bug
Using concatenated string literals as annotation parameter value can lead to different results in javac and eclipse.

To Reproduce

@Builder(builderClassName = "A" + "B")
class B {
}

@Builder(builderClassName = "A" + C.A)
class C {
	private static final String A = "A";
}

Eclipse:

class B {
	class AB { ... }
}

class C {
	class CBuilder { ... }
}

Javac:

class B {
	class BBuilder { ... }
}

class C {
	class CBuilder { ... }
}

Expected behavior
Both should create the same result. If it is not possible to resolve the name lombok should print an error message as it already does if we reference a single constant value.

Version info (please complete the following information):

  • Lombok version: latest
  • Platform: all
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