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

父类字段定义了忽略字段后,子类继承get方法忽略字段不生效,导致死循环 #2913

Closed
wants to merge 8 commits into from

Conversation

ywzou
Copy link
Contributor

@ywzou ywzou commented Sep 2, 2024

父类字段定义了忽略字段后,子类继承get方法忽略字段不生效,导致死循环

public static abstract class AbstractJsonEntity {
    @JSONField(serialize = false)
    private String url;

    get/set
}


public class UrlEntity extends AbstractJsonEntity {
    private String name;
    
    @Override
    public String getUrl() {
         // 导致死循环
        String text = JSON.toJSONString(this);
    }
}

@wenshao
Copy link
Member

wenshao commented Sep 2, 2024

请在本地执行mvn validate修复checkstyle的问题

@wenshao
Copy link
Member

wenshao commented Sep 2, 2024

还有就是不要提交和这次PR无关的修改

@ywzou ywzou closed this Sep 2, 2024
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants