A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4177 below:

[java] New Rule InvalidJavaBean · Issue #4177 · pmd/pmd · GitHub

Proposed Rule Name: InvalidJavaBean

Proposed Category: Design

Description:

This rule would provide the "bean" part of BeanMembersShouldSerialize.
It would check, that the analyzed class adheres to the Java Beans Specification, that means:

Care must be taken to make this rule not as noisy as #1668 . One strategy could be:

Related issues:

References:

Code Sample:

public class MyBean {        // <-- bean is not serializable, missing "implements Serializable"
    private String label;    // <-- missing setter for property "label"

    public String getLabel() {
        return label;
    }
}

Possible Properties:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4