All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.java.rules.squid.S2065.html Maven / Gradle / Ivy

The newest version!
transient is used to mark fields in a Serializable class which will not be written out to file (or stream). In a class that does not implement Serializable, this modifier is simply wasted keystrokes, and should be removed.

Noncompliant Code Example

class Vegetable {  // does not implement Serializable
  private transient Season ripe;  // Noncompliant
  // ...
}

Compliant Solution

class Vegetable {
  private Season ripe;
  // ...
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy