Lombok replaces uppercase getter method with generated camelCase, breaking existing code.
维护者通常 1 天内回复
@rojyates 已经在做这个了。
开始于 2025年10月20日。
评估
这个 Issue 还没有评估数据。
描述
What version of OpenRewrite are you using?
am using
- OpenRewrite v8.62.0
- Maven plugin v6.18.0
- rewrite-migrate-java v3.18.0
How are you running OpenRewrite?
Using the Maven plugin run from the command line.
Multi-module project
Can you share your configuration so that we can rule out any configuration issues?
n/a
Is your project public? If so, can you share a link to it?
Code snippets can also be shared privately via our public Slack.
-->
I am using the Maven plugin, and my project is a single module project.
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>6.18.0</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.lombok.LombokBestPractices</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>3.18.0</version>
</dependency>
</dependencies>
</plugin>
What is the smallest, simplest way to reproduce the problem?
Create a class with a single field and a getter using upper case:
public class Demo {
private String guid;
private String getGUID();
}
What did you expect to see?
No change to the class, since Lombok won't generate an uppercase method name (unless there's a new feature that can do this like an 'upperCase=true' flag on a specific @Getter...? Feature request - in which case expected would be @Getter(upperCase=true) ? )
public class Demo {
private String guid;
private String getGUID();
}
What did you see instead?
public class Demo {
@Getter private String guid;
}
This generates a getter method getGuid() which breaks all existing code that used the uppercase getGUID();
What is the full stack trace of any errors you encountered?
Not applicable.
Are you interested in contributing a fix to OpenRewrite?
In the future, but no time at the moment. Will have a read.
- 主要语言
- Java
- 星标
- 156
- 派生
- 129
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openrewrite/rewrite-migrate-java 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 68/100
openrewrite/rewrite-migrate-java#1246 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
openrewrite/rewrite-migrate-java#1228 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 32/100
openrewrite/rewrite-migrate-java#1227 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
openrewrite/rewrite-migrate-java#1146 · 3 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 50/100
openrewrite/rewrite-migrate-java#1119 · 5 条评论 ·
维护者通常 1 天内回复
查看 openrewrite/rewrite-migrate-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
bisq-network/bisq#8097 ·
维护者通常 1 天内回复
-
area/frontend good first issue kind/cooldown
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/datasketches-java#773 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
cpinitiative/usaco-guide#6665 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
trinodb/trino-gateway#1301 ·
维护者通常 1 天内回复