You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule would provide the "bean" part of BeanMembersShouldSerialize.
It would check, that the analyzed class adheres to the Java Beans Specification, that means:
Each field has a correctly named getter and setter
for indexed properties, check the field is an array and the types match
event listeners implement java.util.EventListener
event listeners always come in pairs (addXXListener, removeXXListener)
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.EventListenerjava.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.beansRelated issues:
References:
Code Sample:
Possible Properties:
package- a regex to configure the packages where this rule should be applied toensureSerialization- whether or not to check for java.io.Serializable