Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Lombok replaces uppercase getter method with generated camelCase, breaking existing code.

未关闭
#879 6 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@rojyates 已经在做这个了。

开始于 2025年10月20日。

评估

这个 Issue 还没有评估数据。

描述

bug

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openrewrite/rewrite-migrate-java 的其他 Issue

查看 openrewrite/rewrite-migrate-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。