sorald.processor.SerializableFieldInSerializableClassProcessor.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sorald Show documentation
Show all versions of sorald Show documentation
An automatic repair system for static code analysis warnings from Sonar Java.
The repair adds the modifier `transient` to all non-serializable
fields. In the future, the plan is to give user the option if they want to go to the class
of that field and add `implements Serializable` to it.
Example:
```diff
public class SerializableFieldProcessorTest implements Serializable {
- private Unser uns;// Noncompliant
+ private transient Unser uns;
```
Check out an accepted PR in [Spoon](https://github.com/INRIA/spoon/pull/2121) that repairs three SerializableFieldInSerializableClass violations.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy