Java serialization bypasses constructors entirely, creating raw object instances and populating fields directly without invoking any constructor logic. This means invariant checks—like ensuring first name and last name are non-null or non-empty—are completely skipped, potentially allowing invalid object instances to exist within an application at runtime.

1m watch time

Sort: