Non-final field of 'Exception' class
Reports fields in subclasses of java.lang.Exception
that are not declared final
.
Data on exception objects should not be modified because this may result in losing the error context for later debugging and logging.
Example:
public class EditorException extends Exception {
private String message; // warning: Non-final field 'message' of exception class
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023