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:
java.util.EventListener
java.io.Serializable
- for the actually check, see the rule NonSerializableClass [java] Rename BeanMembersShouldSerialize to NonSerializableClass #4176)Care must be taken to make this rule not as noisy as #1668 . One strategy could be:
java.beans
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:
package
- a regex to configure the packages where this rule should be applied toensureSerialization
- whether or not to check for java.io.SerializableRetroSearch 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